fix(web): draw one divider where the actions menu has one group - #2
Open
nkyryliuk wants to merge 1 commit into
Open
fix(web): draw one divider where the actions menu has one group#2nkyryliuk wants to merge 1 commit into
nkyryliuk wants to merge 1 commit into
Conversation
The group holding the draft toggle and the merge strategies opened with a divider whether or not it held anything, and the merge strategies drew a second one above themselves whether or not the draft toggle was above them. Both cases are reachable: - On a host with no draft of its own — Bitbucket declares merge and close — nothing renders between the divider that opens the group and the one the merge strategies draw, so the two land together. - On a draft whose "Ready for review" is already the header button, the toggle is withheld to avoid offering it twice and the strategies are hidden because a draft cannot be merged, so the group is empty and the dividers that open and close it land together. Both dividers are now drawn from the same answer as the group's contents. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 a doubled divider in the pull request actions menu on
feat/pull-requests-page.The problem
The menu's action group — the draft toggle and the merge strategies — opens with a divider whether or not it holds anything, and the merge strategies draw a second divider above themselves whether or not the draft toggle is there to be separated from.
Two reachable cases:
A host with no draft of its own. Bitbucket declares
actions: ["merge", "close"], so the draft toggle never renders. Nothing lands between the divider that opens the group and the one the merge strategies draw, and the two sit together.A draft whose "Ready for review" is already the header button. The toggle is withheld so the action is not offered twice, and the strategies are hidden because a draft cannot be merged — so the group is empty and the dividers that open and close it sit together.
Before / after
Captured on this branch, before and after the fix, in one browser session. The server was pointed at a local Bitbucket API double serving a synthetic repository and pull request, so the app exercises its real Bitbucket path end to end. The doubled hairline sits above Merge; counted from the DOM,
role="separator"inside the open menu goes from 4 to 3 with the menu items unchanged.The change
The two members of the group are named once, and every divider around it is drawn from the same answer as its contents:
One file, no behaviour change beyond the dividers.
apps/webtypechecks with no new errors and the tests undersrc/components/pullRequestpass.