fix(features): open feature permalinks for features beyond the first …#7839
Open
narendraio wants to merge 1 commit into
Open
fix(features): open feature permalinks for features beyond the first …#7839narendraio wants to merge 1 commit into
narendraio wants to merge 1 commit into
Conversation
…page A feature permalink (`?feature=<id>`) is opened by the matching `FeatureRow`'s own effect, but rows are only rendered for the current page of results. When the linked feature lives on a later page no row exists, so the permalink was a no-op and the user simply landed on the first page. Add a `FeaturePermalinkHandler` that, when the linked feature is not present on the current page, fetches the feature and its environment feature state and renders a single hidden `FeatureRow`, reusing the existing panel-opening logic rather than duplicating it. Closes Flagsmith#4239
|
@narendraio is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description (replace the blank template with this):
docs/if required so people know about the feature.Changes
Closes #4239
A feature permalink (
?feature=<id>) is opened by the matchingFeatureRow'sown effect, but rows are only rendered for the current page of results. When the
linked feature lives on a later page no row exists, so the permalink was a no-op
and the user simply landed on the first page.
This adds a
FeaturePermalinkHandlerthat, when the linked feature is notpresent on the current page, fetches the feature and its environment feature
state and renders a single hidden
FeatureRow— reusing the existingpanel-opening logic rather than duplicating it.
How did you test this code?
Manually:
/project/<id>/environment/<key>/features?feature=<id>&tab=value.landing on the first page with nothing open.
Also ran
npm run typecheckandeslinton the changed files (no new errors).