Repository navigation
feat(write,sheets): scroll to the page bottom, fix pasting line breaks, Pageless by default, mobile layouts (T-1) - #24
Conversation
…s, Pageless by default, mobile layouts (T-1) - Write, Pages: the last block gets the rest of its page plus the 48 px canvas padding as bottom padding (PaginationStylePhase.tailPadding), so the scroll extent reaches the last page's bottom edge also when the page isn't full (serverpod#1). - Write, paste (serverpod#21): removing a block with spelling errors cleared its underlines from the document listener, before super_editor's layout saw the removal; the layout restyled its stale view model, threw "No such position in document" and stopped updating, so pasted line breaks stayed visible. The spellcheck now clears them in a microtask. - New documents (blank, built-in templates, the welcome document, Markdown) are Pageless unless the user's default layout is Pages (DriveService.newDocumentPageSetup, UserService.defaultPageless); the setting shows Pageless when unset (serverpod#22). - Write on mobile: always Pageless (layout only, the page setup is unchanged), 16 px around the text, a 1 px border line under the title row, and no text selection (selectionGuard collapses user selections, which a read-only document doesn't show) (serverpod#16). - Sheets on mobile: no cell selection (every pointer pans the grid, the selection isn't painted), taller sheet tabs, and only the all-sheets menu and the tabs in the tab bar (serverpod#17). - Specs: Write 04 §28-29, 05 §13.3/§16/§17, suite 02 §6.1, Sheets 03 §5, 04 §6, STATUS; TODO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wonky task review: T-1: Various editor improvementsScreenshot: the description has an image of the changed UI. The pull request successfully fulfills all acceptance criteria related to Write and Sheets updates, both mobile layouts and functional bugs. It properly fixes the multiple line breaks crash by deferring the spellcheck state update into a microtask, resolves the empty page scroll bug via padding computation, and aligns default views securely. The codebase is well-tested around the new interactions.
Scope: Tests: Added. Extensive tests were added asserting the new pasting interactions, scroll layouts, and read-only mobile features. Specs: Updated. Specs 02, 04, 05 and STATUS were updated with mobile layout notes and behavior changes. Risks:
Facts
Reviewed commit |
Wonky-Task: T-1
Wonky-Claim: 6PSV-32KZ
Various editor improvements in Write and Sheets (reports #1, #16, #17, #21, #22).
Acceptance criteria
PaginationStylePhasenow gives the last block the rest of its page plus the 48 px bottom canvas padding (PaginationController.tailPadding); it is component padding, so it never feeds back into the measure. Widget tests: one-line document and a partly full last page (wonky_editor_pagination_test.dart).WriteSpellcheckcleared its underlines from the document listener, before super_editor's layout had seen the removal. The dirty style phase made the layout restyle its stale cached view model, which still had the removed block → "No such position in document" (null node inSingleColumnLayoutSelectionStyler), and the editor stopped updating, so the breaks stayed visible. The underlines are now cleared in a microtask. Reproduced in the browser before the fix and checked after it. Tests: the spellcheck regression (write_spellcheck_test.dart) and paste → delete → undo all → redo all for plain text, HTML paragraphs and<br>soft breaks (editor_clipboard_test.dart).DriveService.newDocumentPageSetup,UserService.defaultPageless): Pageless unless Settings › Write › Page & export › Default layout is Pages, which now shows Pageless when unset. Copies, imports and user templates keep their own page setup; existing documents are unchanged. Tests: server (drive_endpoint_test.dart, welcome document inuser_endpoint_test.dart), Write screen and settings.borderline under the title row (write.mobile.separator), and no text selection (selectionGuardcollapses the selections the user makes, which a read-only document doesn't show; refusing them would crash super_editor's touch interactors). Widget tests inwrite_document_screen_test.dart.sheet_editor_screen_test.dart(touch, long press then move, mouse). Checked in tests only, not on a phone.</>arrows, Explore or selection stats. Widget tests for mobile and an unchanged desktop bar.bordercolor, the Sheets bar its existing tokens; tested in both (screenshots below).Specs updated: Write 04 §28–29, 05 §13.3/§16/§17, suite 02 §6.1, Sheets 03 §5, 04 §6 and STATUS; TODO.
Screenshots (390 px wide)
Checks
dart analyzeanddart formatclean inwonky_write,wonky_sheetsandwonky_server.flutter test -x golden,slow,e2epasses inwonky_writeandwonky_sheets(two unrelated Sheets tests, presence typing hints and a pivot filter, failed only while both suites ran at once and pass on their own).dart testinwonky_serverpasses; three tests that failed insetUpAllduring the full run pass on a rerun, and the MCP page-setup revert test now starts from Pageless. Verified by hand by the user.🤖 Generated with Claude Code