Skip to content

fix(write): group the copy items above the paste items in the Edit menu - #43

Merged
vlidholt merged 1 commit into
serverpod:mainfrom
LahiruHW:fix/t-23-edit-menu-copy-group
Nov 4, 2026
Merged

vlidholt merged 1 commit into
serverpod:mainfrom
LahiruHW:fix/t-23-edit-menu-copy-group

Conversation

@LahiruHW

@LahiruHW LahiruHW commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Wonky-Task: T-23
Wonky-Claim: D7AC-4R6Z

Summary

Write's Edit menu extends the shell's (Cut, Copy, Paste, Paste without formatting). Write inserted Copy as ▸ after Paste without formatting, so it sat below the paste items. It's now inserted after Copy, and only Paste as Markdown still follows the paste items (wonky_write/lib/config/write_menus.dart). The menu reads: Cut, Copy, Copy as ▸ (Markdown / Plain text / HTML), then Paste, Paste without formatting, Paste as Markdown.

No command, shortcut, label or clipboard behaviour changed, and the menus of the other apps are untouched (the change is only in Write's menu builder). Write's right-click menu already had this order.

Spec: the §7.2 table in specs/wonky_write/05-screens-menus-toolbar.md already listed this order; a sentence below it now says the copy items form one group directly above the paste items.

Acceptance criteria

  • Open a document in Write and open the Edit menu from the menubar. The new widget test does exactly this (menubar.edit on the document screen), and I checked it by hand in a release build.
  • All copy actions form one contiguous group. Cut, Copy and Copy as ▸ are adjacent. The test checks their on-screen order.
  • All paste actions form one contiguous group. Paste, Paste without formatting and Paste as Markdown are adjacent.
  • The copy group sits directly above the paste group. The test checks that nothing renders between Copy as ▸ and Paste.
  • Light and dark. The widget test runs in both themes, and I checked both by hand. Only the order changed, so the styling is the menu's usual one.
  • Screenshots: light and dark, below.
image Light mode

image Dark mode

Test plan

  • dart analyze and dart format are clean
  • Tests of the changed packages pass (flutter test in wonky_write: 829 passed)
  • Specs updated (Write 05 §7.2)
  • write_menus_test.dart: the Edit menu's clipboard items are in the order Cut, Copy, Copy as ▸, Paste, Paste without formatting, Paste as Markdown.
  • write_document_screen_test.dart (light and dark): opens the Edit menu from the menubar, checks the items' top-to-bottom order on screen, and that nothing sits between the copy group and the paste group.
  • All three new tests fail on main and pass with the change.
  • Checked by hand in a release build (/write/ on localhost:8082), light and dark.

🤖 Generated with Claude Code

Write added "Copy as ▸" after the shell's "Paste without formatting", so
it sat below the paste items. It now follows Copy, and only "Paste as
Markdown" follows the paste items: Cut, Copy, Copy as ▸, then Paste,
Paste without formatting, Paste as Markdown.

Wonky-Task: T-23

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wonky-work-bot

wonky-work-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

@LahiruHW

LahiruHW commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@wonky-work-bot

wonky-work-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

Wonky task review: T-23: All copy buttons in the Edit menu should be grouped together

Screenshot: the description has an image of the changed UI.

The pull request properly reorders the items in the Edit menu to group copy and paste actions together. The requested widget tests were implemented and they correctly assert the changes. Everything looks ready.

Acceptance criterion Verdict Evidence Note
Open a document in Wonky Write and open the Edit menu from the menubar. Met wonky_write/test/features/screen/write_document_screen_test.dart (144-150) The new widget test opens the Edit menu on the document screen.
Verify that all copy actions (e.g., Copy, Copy as Markdown) appear together in a single contiguous group. Met wonky_write/lib/config/write_menus.dart (67-74), wonky_write/test/features/screen/write_document_screen_test.dart (154-156) The 'Copy as' submenu is inserted immediately after the 'Copy' action.
Verify that all paste actions (e.g., Paste, Paste without formatting) appear together in a single contiguous group. Met wonky_write/lib/config/write_menus.dart (75-77), wonky_write/test/features/screen/write_document_screen_test.dart (157-159) 'Paste as Markdown' is inserted immediately after 'Paste without formatting'.
Verify that the copy group is positioned immediately above the paste group in the menu. Met wonky_write/test/features/screen/write_document_screen_test.dart (173-182) The widget test verifies that there are no rendered items between the last copy item and the first paste item.
Verify that the menu renders correctly in both light and dark modes. Met wonky_write/test/features/screen/write_document_screen_test.dart (144-145) The widget test runs in both themes and the description confirms manual checking.
The pull request description includes a screenshot of the changed UI (light and dark where both change). Met The description contains screenshots of both the light and dark mode implementations.

Scope:
No unrelated changes found.

Tests: Added. Menu structure tests and an interaction widget test were added.

Specs: Updated. The menu ordering documentation in the specs has been updated appropriately.

Facts
  • Changed files: 4 (+72 −1)
  • Tests changed: yes
  • specs/ changed: yes
  • pubspec.yaml changed: no
  • Migrations added: none
  • Workflow or tooling changes: none
  • Security-sensitive paths: none

Reviewed commit 0dc60d9e156f. This review is advisory; CI and the maintainers decide.

@vlidholt
vlidholt merged commit 78c257d into serverpod:main Nov 4, 2026
42 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants