fix(desktop): align sidebar toggle switches to right edge#8101
Open
Git-on-my-level wants to merge 1 commit into
Open
fix(desktop): align sidebar toggle switches to right edge#8101Git-on-my-level wants to merge 1 commit into
Git-on-my-level wants to merge 1 commit into
Conversation
Add ml-auto to the toggle switch container in toggleRow() so the Screen recording and Microphone toggle switches are always flush-right within their rows, regardless of label text length. Previously the toggle relied solely on flex-1 on the sibling label to push it right. Adding ml-auto makes the intent explicit and ensures both toggles share the same right-edge position.
There was a problem hiding this comment.
No issues found across 1 file
Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more
Re-trigger cubic
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.
Problem
In the desktop app sidebar, the quick-capture toggle switches (Screen recording and Microphone) were not reliably flush-right aligned within their rows. The toggle switch container relied solely on the sibling
<span>havingflex-1to absorb remaining space, which left the right-edge position implicit and fragile.Fix
Added
ml-autoto the toggle switch<span>insidetoggleRow()inSidebar.tsx.ml-auto(Tailwind formargin-left: auto) explicitly pushes the toggle switch to the far right of the flex row, independent of label text length. Since both toggle rows use the sametoggleRow()function, they now share the same right-edge position.Before / After (layout diagram)
File changed
desktop/windows/src/renderer/src/components/layout/Sidebar.tsx— addedml-autoto toggle switch className intoggleRow()(line 129)