Conversation
The asset viewer's location row offered a "view in map" pin, and a Space's tab bar a Map tab, even with the map feature turned off. /map redirects to /photos in that case, so both links bounced the user out of where they were. Gate them on featureFlagsManager.value.map, the same flag the sidebar, command palette and embedded detail-panel map already check.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1046.
With the map feature turned off,
/mapredirects to/photos. Two links didn't check the flag, so clicking them sent the user out of where they were:DetailPanelLocation.svelte), which is what the issue reportsspace-tabs.svelte), which has the same problemBoth now check
featureFlagsManager.value.map, the same flag the sidebar, the command palette and the embedded map in the detail panel already use.Tests
detail-panel-location.spec.ts: withmapoff, the pin is gone while the location filters and the edit pencil stay. Withmapon, the pin renders.space-tabs.spec.ts: withmapoff, the Map tab is gone.space-layout.spec.ts: adds a feature-flags stub, since it rendersSpaceTabs(the app initialises the flags in the root layout).I watched both new flag-off tests fail before the fix and pass after it. The full web unit suite passes (391 files, 6399 tests), and
svelte-check, eslint and prettier are clean.