Skip to content

Add url for favorite folders#1388

Merged
alisa911 merged 4 commits intomainfrom
230126_2
Jan 27, 2026
Merged

Add url for favorite folders#1388
alisa911 merged 4 commits intomainfrom
230126_2

Conversation

@alisa911
Copy link
Copy Markdown
Contributor

No description provided.

@alisa911
Copy link
Copy Markdown
Contributor Author

#629

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds URL parameter support for favorite folders, allowing users to share and navigate to specific folders via URL. The implementation synchronizes the URL with the currently open folder and handles browser back/forward navigation.

Changes:

  • Modified useUpdateQueryParam hook to return an object containing both updateQueryParam function and searchParams, improving API consistency and allowing consumers to access search parameters directly
  • Added URL synchronization for favorite folders using a folder query parameter that tracks the currently open folder
  • Implemented map marker filtering to show only the open folder's markers when a folder is selected, improving map clarity

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
map/src/util/hooks/menu/useUpdateQueryParam.js Changed return value from function to object containing updateQueryParam and searchParams
map/src/menu/weather/WeatherForecastSourceActions.jsx Updated to destructure updateQueryParam from hook return value
map/src/menu/weather/WeatherForecastDetails.jsx Updated to destructure updateQueryParam from hook return value
map/src/frame/components/header/HeaderMenu.jsx Updated to destructure updateQueryParam from hook return value
map/src/menu/favorite/FavoritesMenu.jsx Added URL synchronization logic, back/forward navigation handling, and loading state for folder opening
map/src/menu/favorite/FavoriteGroup.jsx Added URL parameter update when folders are opened
map/src/menu/actions/GroupHeader.jsx Added URL parameter updates when folders are closed via back button or close button
map/src/menu/MainMenu.js Added check to prevent navigation when folder URL parameter exists during favorites loading
map/src/map/layers/FavoriteLayer.js Refactored marker visibility logic to show only open folder's markers when a folder is selected
map/src/context/AppContext.js Added FAVORITES_URL_PARAM_FOLDER constant for the folder query parameter name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread map/src/menu/actions/GroupHeader.jsx Outdated
Comment thread map/src/menu/favorite/FavoritesMenu.jsx Outdated
Comment thread map/src/menu/actions/GroupHeader.jsx Outdated
@alisa911 alisa911 merged commit b7f1d34 into main Jan 27, 2026
@alisa911 alisa911 deleted the 230126_2 branch January 27, 2026 10:12
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.

3 participants