Skip to content

Conversation

@tamanwit
Copy link

@tamanwit tamanwit commented Oct 3, 2025

✨ Feature: Persistent City Bookmarking

This Pull Request introduces a high-value feature allowing users to permanently save and quickly access their favorite cities, significantly improving the user experience for frequent use.

📋 Key Changes Implemented:

  1. Bookmark Toggle: Added a dynamic bookmark icon next to the city/country display in the navigation bar.
    • Clicking it saves the currently displayed city.
    • The icon state changes to filled (fa-solid) when the city is saved and outlined (fa-regular) when it is not.
  2. Persistent Storage: Implemented localStorage to save the list of favourited cities, ensuring the user's list persists across browser sessions.
  3. Dedicated Sidebar Section: Introduced a new "My Favourites" section in the sidebar to display the saved cities.
  4. Interactive List: Each city listed in the sidebar is clickable, instantly loading the full weather report for that location.
  5. Removal Functionality: Added a small delete button (or 'X' icon) next to each favourite city for easy one-click removal from the list.
Screenshot 2025-10-03 130940

💡 Why this is valuable:

  • Improved UX: Eliminates the need to search for common locations repeatedly.
  • Engagement: Encourages users to return by making their personalised content easily accessible.

🛠️ Technical Details:

  • Files Modified: index.html, css/style.css, and js/main.js.
  • New/Updated Functions in js/main.js:
    • Handles saving, loading, and removing cities from localStorage.
    • Dynamically renders the favourites list on page load and on state change.
    • Ensures weather data is fetched correctly when a favourite is clicked.

Feel free to let me know if you have any questions or require any changes!

@vercel
Copy link

vercel bot commented Oct 3, 2025

@Tamanwit19 is attempting to deploy a commit to the devjain2309's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants