Improve text wrapping for folder paths and free space display#727
Conversation
The free-space value in the root folder picker could wrap mid-value (e.g. "27.6" / "TB free"). Join its words with non-breaking spaces so it stays intact, and allow the path to wrap only at its slashes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1833622d14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var string = AttributedString(label) | ||
| // Allow the path to wrap only after its slashes (zero-width space), so a long | ||
| // path breaks across lines the way a file path naturally reads. | ||
| var string = AttributedString(label.replacingOccurrences(of: "/", with: "/\u{200B}")) |
There was a problem hiding this comment.
Add required release notes for this UI change
This changes the user-visible root-folder label rendering in the add/edit media pickers. The repository's AGENTS.md requires user-facing changes to add a CHANGELOG.md entry under Unreleased and keep TestFlight/WhatToTest.en-US.txt matching it; this commit only changes Instance.swift, so the release notes and TestFlight test text will omit this visible change.
Useful? React with 👍 / 👎.
Summary
Improves the layout of root folder information in instance views by controlling where text can wrap, ensuring file paths and disk space values display more naturally.
Changes
/character to allow paths to wrap only at natural boundaries (between directory levels) rather than breaking arbitrarilyImplementation details
\u{200B}) to guide text wrapping without affecting visual appearance\u{00A0}) to bind related text components togetherreplacingOccurrences(of:with:)on the label strings before creatingAttributedStringinstanceshttps://claude.ai/code/session_01PZurKUsusy7ELBHXQqFK36