Repository navigation
Rebuild the editing UI around one tool per tap, and sell it by the tool - #668
Merged
Merged
Conversation
The strip under the edit bar was up to eleven targets wide and scrolled on a phone: every marking tool carried a second button for its colour, and undo and redo sat at the end where a pdf pushed them off the screen. The strip is now formatting alone. Undo, redo and save are `menu/edit.xml`, so they stand in the bar and do not scroll away, and `EditActionModeCallback` dims them on what the page reports. A sheet or a plain text file shows no strip at all. Every tool is one 48dp square: a tap does the tool's one job and a long press opens the colours it applies, so the chevrons are gone. The colour bar under an icon is what the next tap uses, and it sits at the foot of a deep slot - close under the ink, a squiggle that dips and a strikethrough that stops high read as bars at different heights. The fourteen font sizes are a row under the strip rather than a menu down the screen, scrolled to the size the text is in. A pdf's tools no longer arm themselves. `odr.annotation.press` marks a standing selection and arms only what it could not mark, so `PageView.pressMarkTool` puts every tool but the pen back down. With nothing selected the answer is the `action_annotate_banner` snackbar. The page's `markOnSelection` is therefore off: it marked as the selection was made, which is the opposite order. The bridge states the sheet's gesture too, because an android WebView reports a fine pointer on an emulator. The gate moved from the mode to the tool. Every edition opens every kind the core calls editable, and a locked strip dims what only offers pro and leaves the highlighter working - `highlight` being the formatting style and the pdf's marking tool alike. A mode nobody can do anything in is not worth opening. The two offers say what is still pro; their translations are dropped rather than left stating the old, now false, thing. No string is new: every label reuses one the app already has in nineteen languages, and `action_edit_banner` is gone from all of them. The free highlighter in a text document wants a core carrying opendocument-app/OpenDocument.core#909, which is unreleased: against 7.1.0 the page refuses it and the offer of pro comes up, as it does today. Checked on a Pixel 6 Pro emulator in both themes and both editions: 97 instrumented tests on pro, 97 on lite, the unit tests, lint, and all three flavors build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJJdfqpnVCKBNHXjAVxSou
`ic_marker` was Material's `edit` icon, so the highlight tool, the Draw tool and the Edit button were all pencils: `ic_edit` on the button that edits a document, `ic_marker` on the one that marks up a pdf and on the highlighter beside `ic_draw` in the strip. At 22dp they were not worth telling apart. It is now a highlighter: the wedge nib that says the ink goes on in a band, the barrel, and the cap at the back. The colour it lays down is still the bar under it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJJdfqpnVCKBNHXjAVxSou
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.
The strip under the edit bar was up to eleven targets wide and scrolled on a phone. Every marking tool carried a second button just for its colour, and undo and redo sat at the end, where a pdf's five tools pushed them off the screen.
The strip is formatting alone
Undo, redo and save are
menu/edit.xmlnow, so they stand in the bar and cannot scroll away, andEditActionModeCallbackdims them on what the page reports. The bar's title is the mode's name - three buttons leave a phone no room for a sentence.The colours are on a long press. A tap does the tool's one job; the bar under the icon is the colour the next tap uses. Text colour is the exception and opens its colours on a tap too, because it has nothing to toggle, so nobody is stranded who never finds the long press. The press carries an accessibility action label built from the
tool_color_ofstring the chevrons used.The bar sits at the foot of a deep slot. Close under the icon, an icon's own shape decides the gap - a squiggle dips, a strikethrough stops high - and 3dp of clearance made that read as bars at different heights. Measured on a device the bars were always level to the pixel; the gap ran from 11px to 21px. Away from the ink the eye lines them up against each other instead.
The font sizes are a row, not a menu. Fourteen items down the screen covered the document they were about; the row scrolls to the size the text is in.
A pdf's tools mark what is selected
odr.annotation.pressmarks a standing selection and arms only what it could not mark, soPageView.pressMarkToolputs every tool but the pen back down and reports what happened. With nothing selected the answer is theaction_annotate_bannersnackbar, not a tool left armed. The page's ownmarkOnSelectionis off: it marked as the selection was made, which is the opposite order.The gate is on the tool, not the mode
Every edition opens every kind the core calls editable. A locked strip dims what only offers pro and leaves the highlighter working, under both names it has -
highlightis the formatting style and the pdf's marking tool alike. A mode nobody can do anything in is not worth opening, and a reader who has highlighted a paragraph knows what the rest would do.Both offer strings were reworded, and their translations dropped rather than left stating the old, now false, thing.
No string is new: every label reuses one the app already has in nineteen languages, and
action_edit_banneris gone from all of them.Checked
On a Pixel 6 Pro emulator, light and dark, pro and lite, and by hand on a Pixel 9 Pro: 97 instrumented tests on pro, 97 on lite, the unit tests, lint, and all three flavors build.
MainActivityTests.onlyThePenStaysArmedis new and pins the marking rule and the gate.