feat(dependencies): add the Dependencies tab - #8637
Draft
talissoncosta wants to merge 6 commits into
Draft
talissoncosta wants to merge 6 commits into
talissoncosta wants to merge 6 commits into
Conversation
Types mirror the dependencies API in full, including the segment fields the tab does not read. The endpoints are not on main yet (#8570, #8571), so the two GETs serve fixtures behind a single `useFixtures` constant. Removing it, both of its branches and the fixtures file leaves the real service behind. The POST and DELETE have no fixture, so they fail until the API lands rather than faking a success. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backed by getFeatureList, so search and paging happen on the server rather than pulling every flag in the project. Takes `ignore` for the feature being edited and the ones already picked. The legacy FlagSelect.js fetches through _data and stays where it is; its one caller is CompareFeatures. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Two tables and the states they collapse to. Presentational only, so the tab can wire data and permissions on top. Prerequisites carry a status tick for whether each one is currently enabled in this environment, since an unmet prerequisite is why the flag is serving its disabled value. A row from a hand-written segment condition gets no remove control: the API will not delete it, and naming segments is out of scope for V1. Dependent rows open that feature's own Dependencies tab. Font sizes are literals rather than $font-caption. A component stylesheet is loaded on its own and never sees _variables.scss, and the scale has no custom properties yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Wires the tables to the service. Adding and removing write straight away: there is no bulk endpoint, so a batch save would loop POSTs and leave the tab half applied on the first refusal. The picker sits above the table rather than behind a button, matching Segment Overrides, and drops the feature itself and anything already added so the two refusals a user would hit most never fire. The rest surface their own message, which names the features and the rule. The edges carry only a name and an id, so whether a prerequisite is currently met comes from the feature list the picker already loads. No change request handling: this issue is scoped to environments without them, and #8428 covers the rest. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sits after Segment Overrides, behind the flag_dependencies flag. Hidden where change requests are enforced as well as inside one. Writes land immediately, so on a four-eyes environment the tab would be a way to change a flag's gating without approval, through a route the rest of the modal closes. #8428 covers that case. Clicking a dependent feature leaves through the features list rather than swapping this modal's feature underneath itself: ?feature= is the deep link the list already owns, and ?tab= is read by Tabs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.alert lays its children out with flex, so each <strong> became a flex item and the text around it collapsed: "so0001_testis serving its disabled value inDevelopment". One box of its own and the message reads as a sentence again. Caught by running it; the markup looks right in the source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch had an error being 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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #8427
A Dependencies tab in the Edit Feature modal: what gates this flag, and what it gates. Behind
flag_dependencies.Writes land immediately. There is no bulk endpoint, so a save button would loop POSTs and leave the tab half applied on the first refusal. The picker sits above the table rather than behind a button, matching Segment Overrides.
The picker drops the feature itself and anything already added, so the two refusals a user would hit most never fire. The other three surface their own message, which names both features and the rule they broke.
Per the issue, there is no "Must be" column and every dependency means "must be enabled". A row from a hand-written segment condition gets no remove control: the API will not delete it, and naming segments is out of scope for V1 per the issue's comments.
No change request handling. This issue is scoped to environments without them, so the tab also hides where they are enforced. Writing immediately would otherwise be a way to change a flag's gating without approval, through a route the rest of the modal closes. #8428 covers that case.
Fixtures.
GETdependencies and dependents are not on main yet (#8570, #8571), so both serve fixtures behind a singleuseFixturesconstant. Removing it, its two branches and the fixtures file leaves the real service behind.POSTandDELETEhave no fixture and fail until the API lands, which seemed more honest than faking a success.Still blocked on one thing:
DELETE .../dependencies/{prerequisite}does not exist. It is in the RFC at 2.3.2 andfeatures.dependencies.deletedis already in the events catalogue, but there is no issue and no PR. The bin icon is in the mockups, so this cannot ship without it.How did you test this code?
.alertlays its children out with flex, so each<strong>in the warning became a flex item and the text around it collapsed into "so<flag>is serving its disabled value in<environment>". Fixed in its own commit.forwardRefandmomentwarnings are pre-existing.tsc --noEmitandeslint --fixclean. The oneconstants.tserror is pre-existing on main, verified by stashing.