fix(one-page): wrap a long picked note name instead of cutting it - #2135
Conversation
The one-page file picker's chip cut a long note name with an ellipsis, so on a phone you could not tell which note was picked. The name now wraps, starting each line at the chip's left edge. Fixes #2134
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; 6 remain after this review. 📝 WalkthroughWalkthroughThe file-picker chip label now wraps long names instead of truncating them with an ellipsis. The end-to-end tests check wrapping, label visibility, remove-button width, and clipping at the picker boundary. ChangesFile-picker chip labels
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Long selected names will wrap instead of being truncated, with no concrete regression identified that should prevent merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 taps a label wide, Comment |
Summary
The one-page form's file picker cut a long picked note name with an ellipsis (#2134), so on a phone you could not tell which note was picked. The chip label now wraps (
overflow-wrap: anywhere), andtext-align: startkeeps a wrapped line at the chip's left edge (it inherited the setting control'sendalignment, which right-aligned the second line).Older than 2.30: 2.29.0 cuts a
{{FILE:}}chip the same way. Since #2099 every one-page Capture to a folder, tag or property shows this chip, so 2.30 shows it much more often.Before / after (iPhone, iOS 18.7, Obsidian 1.14.3, 440 px wide)
Testing
tests/e2e/one-page-capture-target.test.ts"shows the picked note's whole name on a phone" now picks a 93-character name in a 440 px modal and checks it is not cut, wraps onto more than one line, and starts every line at the same x. It fails on master (cut) and withoverflow-wrapalone (right-aligned second line).pnpm run test: 6607 passed, 33 skipped.pnpm run build-with-lint: clean.Release impact
Visual only; a long name makes the chip taller. No settings or data change.
Fixes #2134
Note
Wrap long picked-note names in one-page quick-add chip instead of ellipsis
Replaces the ellipsis/single-line rules on
.quickAddModal .qa-onepage-file-picker__chip-labelin styles.css withoverflow-wrap: anywhereword wrapping and start text alignment, so long picked-note names wrap across lines instead of being cut.Macroscope summarized 346fa72.
Summary by CodeRabbit