fix(mobile): line up toggles on the right of a choice's settings page - #2149
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe mobile checkbox-only control rule now right-aligns its contents. A phone end-to-end test checks toggle alignment on a capture choice settings page. ChangesPhone Toggle Alignment
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change aligns toggle-only settings rows on phones, with no identified issue requiring resolution before merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. A rabbit checks the toggles’ place, Comment |
In the settings window Obsidian's narrow-container rule lets a row's control grow and starts its content on the left, so a toggle next to a short name sat up to 45px short of the others. Fixes #2146
d1be4ac to
c49645d
Compare
On a phone, some toggles on a choice's settings page sat left of the others: on a new Capture, "Create file if it doesn't exist" 16px short of the card's edge, "Task" 28px and "Open" 45px; "Open" on a Template too. They lined up in the builder dialog before #2141.
Inside the settings window, Obsidian's narrow-container rule gives every row that is not
mod-togglea control that grows and starts its content on the left. QuickAdd's toggle rows are SvelteSettingItems withoutmod-toggle, and the mobile rule that keeps toggle-only rows inline (#1637) setwidth: autobut not the alignment. Next to a short name the control still grows, so its toggle stayed on the left. The rule now also aligns the control's content to the end, as Obsidian's own toggle rows are.Phone 390x844, a new Capture (before / after):

Tests
choice-builder-pages-phonecase: on a new Capture's page indev:mobileat 390x844, every toggle-only row's toggle ends at the row's content edge. It fails on master ("Create file if it doesn't exist: 16px", "Task: 28px", "Open: 45px").pnpm run build-with-lint,pnpm run test(6618 passed) and.agents/run-e2epass.Release
CSS only, no migration. Lands before 2.30.0 alongside #2141.
Fixes #2146
Note
Fix mobile settings page to right-align checkbox-only toggle rows
Right-justifies the control container on mobile QuickAdd setting rows whose only control is a checkbox, in styles.css. Other row styles (direction, alignment, width, top margin) stay the same.
openChoicePageE2E helper in choice-builder-pages-phone.test.ts that can open and verify any choice's configuration page; the existing macro test now uses it.Macroscope summarized c49645d.
Summary by CodeRabbit