Shared QML controls in qml/controls/ for our tweaks of Controls 2 #91

Closed
opened 2026-10-27 22:15:00 +00:00 by claude-bot · 0 comments
Collaborator

This came out of the phone check on PR #90. A plain Controls 2 TextField has no edit menu on UT: Suru only styles it, and the Lomiri bubble belongs to Lomiri.Components, which we don't load. The owner's call: keep our own tweaks, and make them shared components, because the case will come up again.

PR #90 starts qml/controls/ (a qmldir, imported as "../controls") with TextEntry, a TextField with Cut/Copy/Paste/Select all on press and hold. It is used by Import's address field, the module search and the typed reference.

To do here: move the tweaks that already exist, or are repeated across pages, into qml/controls/, with no visible change. Candidates from a sweep of qml/:

  • The footer menu with icons drawn in the label's colour (#84, ReadingPane.qml Menu/MenuItem). Make it IconMenuItem (and a Menu if needed), so the Suru-versus-palette logic lives in one place.
  • The task progress row: a module name, a ProgressBar, an error, and Retry/Cancel. It is in ModulesPage.qml (3 ProgressBars, now also the import rows) and StarterPage.qml (2).
  • The option with a reason when greyed out: a Switch row with a note, as the CLAUDE.md rule requires ("greyed out with an explanation"). It is in DisplaySettings.qml (3) and SettingsPage.qml (1).
  • The button greyed out offline: enabled plus opacity: 0.4 plus the offline note, in ModulesPage's Install, Update and Import (#87).
  • PageBar: already shared, but under qml/pages/. Move it.
  • The side sheet (BibleChooser.qml Drawer) and the small modal Dialog pattern (ModulesPage). Share them once a second user appears; don't add them before then.

Rule to add to CLAUDE.md (Code layout): a Controls 2 control we tweak, or a combination used on two or more pages, goes in qml/controls/ as its own file. Pages compose them. Controls hold no app logic (that stays in core and the glue), and use only QtQuick.Controls 2 (a Lomiri variant goes under qml/platform/ut/).

Check: the e2e cases and shots are unchanged (objectNames are kept), and mem-check is no worse.

🤖 Generated with Claude Code

This came out of the phone check on PR #90. A plain Controls 2 `TextField` has no edit menu on UT: Suru only styles it, and the Lomiri bubble belongs to Lomiri.Components, which we don't load. The owner's call: keep our own tweaks, and make them shared components, because the case will come up again. PR #90 starts `qml/controls/` (a qmldir, imported as `"../controls"`) with `TextEntry`, a TextField with Cut/Copy/Paste/Select all on press and hold. It is used by Import's address field, the module search and the typed reference. **To do here:** move the tweaks that already exist, or are repeated across pages, into `qml/controls/`, with no visible change. Candidates from a sweep of `qml/`: - **The footer menu with icons drawn in the label's colour** (#84, `ReadingPane.qml` Menu/MenuItem). Make it `IconMenuItem` (and a `Menu` if needed), so the Suru-versus-palette logic lives in one place. - **The task progress row**: a module name, a ProgressBar, an error, and Retry/Cancel. It is in `ModulesPage.qml` (3 ProgressBars, now also the import rows) and `StarterPage.qml` (2). - **The option with a reason when greyed out**: a Switch row with a note, as the CLAUDE.md rule requires ("greyed out with an explanation"). It is in `DisplaySettings.qml` (3) and `SettingsPage.qml` (1). - **The button greyed out offline**: `enabled` plus `opacity: 0.4` plus the offline note, in ModulesPage's Install, Update and Import (#87). - **`PageBar`**: already shared, but under `qml/pages/`. Move it. - **The side sheet** (`BibleChooser.qml` Drawer) and the small modal Dialog pattern (ModulesPage). Share them once a second user appears; don't add them before then. **Rule to add to CLAUDE.md (Code layout):** a Controls 2 control we tweak, or a combination used on two or more pages, goes in `qml/controls/` as its own file. Pages compose them. Controls hold no app logic (that stays in core and the glue), and use only QtQuick.Controls 2 (a Lomiri variant goes under `qml/platform/ut/`). **Check:** the e2e cases and shots are unchanged (objectNames are kept), and mem-check is no worse. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/utStudyBIble#91
No description provided.