Commit Graph
234 Commits
Author SHA1 Message Date
BFlat 9e0df623b1 Merge pull request #2596 from dotCooCoo/feat/craft-menu-app-menu-labels
craft-menu: the minimal macOS app menu takes the app's translations
2026-11-30 01:09:18 +07:00
BFlat abb4ad8cc9 Merge pull request #4251 from dotCooCoo/fix/automation-readonly-field-edits
shortcuts: automation cannot press, assign or remove a shortcut where the user cannot edit one
2026-11-29 20:25:06 +07:00
David Mann 0526210afd menu: the undo toggle tests compare with the keys as stored, not as Windows shows them 2026-11-29 13:14:24 +01:00
David Mann 5dab5d4317 menu: a queued undo key no longer allowed is dropped, and the toggling button acts only as it reads 2026-11-29 12:51:26 +01:00
David Mann 0990990739 menu: the undo keys re-check after each step, so a second step in a frame cannot reach past the last change 2026-11-29 12:43:53 +01:00
David Mann ff93186c9f menu: Keyboard Shortcuts dialog can offer one Undo button that steps the last change
Options::undo = UndoButtons::Toggle puts one button in the footer in place of
Undo and Redo: it undoes the last change and turns into Redo, which applies it
again and turns back into Undo. Starting to record a shortcut disables it until
the next change, so it never reaches past the change before. The undo and redo
keys follow the button. The default (History) is unchanged.
2026-11-29 12:36:15 +01:00
dotCooCoo 0029c5e434 shortcuts: automation cannot press, assign or remove a shortcut where the user cannot edit one
ShortcutsDialog::set_json_field refused `replace` in a read-only dialog,
while a prompt, review or recording was open, and on an app tab, but it
accepted `pressed`, `assign` and `remove` in those states.

DialogState::can_edit holds the condition `replace` already used, and
all four editing fields now return the inactive refusal when it is
false.
2026-11-29 00:49:24 -08:00
autocraft-bot[bot] 1f65084b15 Merge main into design-port/pr-dialog-looks 2026-11-28 23:15:38 +00:00
Martin BallandClaude Opus 5.5 b055d0fb30 shortcuts: cap the Categories list in the command-lists layout so Commands keeps room (wordcraft#7971) (#4029)
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:57:23 +00:00
Martin BallandClaude Opus 5.5 7c058a1d2d fix(menu): GalleryFace::rendered gets a checker switch (#4027) (#4059)
Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:18:42 +00:00
autocraft-bot[bot] 11f56bb5e7 Apply review fixes
- crates/menu/src/shortcuts/keyboard.rs
2026-11-28 18:35:41 +00:00
skylartaylor 7e7128ad21 Merge craft-libs main and regenerate the contract catalog 2026-11-28 18:22:22 +01:00
dotCooCoo b5eb2243d4 Merge main into feat/craft-menu-app-menu-labels 2026-11-28 05:30:46 -08:00
autocraft-bot[bot] 8dd31dcb11 Apply requested fixes
- crates/menu/src/shortcuts/keyboard.rs
2026-11-28 04:05:13 +00:00
dotCooCoo 3fff389bdd Retire shortcut conflict confirmation when a holder changes 2026-11-27 16:22:11 -08:00
dotCooCoo 3bf8cc53f5 Replace a keyboard shortcut through dialog automation 2026-11-27 15:59:48 -08:00
aiongg ee7ae9fb80 Merge storytold main (2aa00e60bf) into fw365-int
Conflicts:
- ui-contract items/hooks.rs: rest_lead takes no placement here; main's
  lead focus ring block is kept as main wrote it.
- ui-panels docking/mod.rs: main's FocusLook import kept; the memory::sub
  import goes, since the dock no longer keeps pass frames in memory.

Follow-ups of the merge:
- MeasureCx::in_row (main) reads row_alone_room from the component's
  scope env, as column_room does here.
- The split-handle focus ring trial (main) passes SplitArea's revision.
2026-11-27 15:00:15 +00:00
BFlat 389254143e Merge pull request #3779 from dotCooCoo/fix/shortcut-detail-replace
menu: the shortcut detail pane can replace each saved binding
2026-11-27 14:22:19 +07:00
BFlat 885713e953 Merge pull request #3852 from dotCooCoo/fix/keymap-scoped-override-persistence
Keep shortcut edits atomic when overrides cannot be saved
2026-11-27 14:08:52 +07:00
aiongg 4a4f21df97 Merge fw365-f3-cl (c417cd3050) into fw365-int: shell slots as keyed views 2026-11-27 06:18:07 +00:00
skylartaylor a8786edae3 Merge remote-tracking branch 'origin/main' into design-port/pr-dialog-looks 2026-11-27 04:51:02 +01:00
aiongg dc82c38b97 Merge remote-tracking branch 'upstream/main' into fw365-int 2026-11-27 03:40:00 +00:00
aiongg c417cd3050 feat(ui-shell): shell slots take the host's version and replay as memoized views (FW-365 F3)
Every slot and the full-window page take a version function of the app
state, read at the slot's turn in the pass. While it holds and no input
reaches the slot, the slot's chrome pane and its content replay their
last run; None runs the slot in every pass. The body runs every pass.

The MemoProps derive leaves a type parameter that only covered_by fields
name unbound, so a view can hold the shell's &mut S. PaneEdge derives
MemoProps.
2026-11-27 03:31:12 +00:00
aiongg 8401672c4c perf(ui-contract): menu titles share their held commands, and facts are read in place
A menu title kept its held commands in a Vec, and commands::holds copied every command into a new Arc on
each run of the title. MenuTitle keeps an Arc<[CommandRef]> and holds() shares it. Facts::of_last_pass
cloned last pass's facts for every read; Facts::with_last_pass lends them to the reader instead, so the
menu bar's is_open and is_focused answer without a copy.
2026-11-27 00:28:34 +00:00
dotCooCoo dadf72bbbe Keep shortcut edits atomic when a binding cannot be saved 2026-11-26 13:01:10 -08:00
dotCooCoo c4c52fe1f0 menu: the shortcut detail pane can replace each saved binding 2026-11-26 10:17:30 -08:00
aiongg 5ec98bd628 Merge remote-tracking branch 'upstream/next' into next-into-main-2
# Conflicts:
#	crates/ui-widgets/src/text/text_field.rs
2026-11-26 11:03:44 +00:00
FredApps cb399e16e2 Merge remote-tracking branch 'origin/next' into tc14-3481 2026-11-26 16:08:39 +07:00
bflatastic 76322b729c menu: the macOS rebuild retry keeps std Instant, allowed and listed
runtime::motion::now returns a web_time Instant, which is not std's on wasm,
so the menu macOS and WASM lint job failed to compile mac.rs. The AppKit
rebuild retry is a native timer outside any pass, so it keeps Instant::now
with a contract/motion marker and its entry in
design/exceptions/craft-menu/crate.toml.
2026-11-26 13:03:37 +07:00
aiongg 2ac1123a2c craft-menu: the rebuild retry reads the framework's Instant, which is the browser clock on wasm 2026-11-26 05:58:25 +00:00
aiongg 915bbe59d1 Clear the design-lint findings next brought
- craft-draw: the Bezier overlay's read counter is a test-only module the lint
  recognises (cfg(test) and the screen-testing feature as two attributes). It
  stays per thread, so parallel trials do not add to each other's counts.
- craft-menu: the macOS menu retry reads the runtime's motion clock and asks
  for its repaint through runtime::frame.
- craft-ui-panels: Prompt's layer_role setter is derived (#[prop]).
2026-11-26 05:47:11 +00:00
dotCooCoo d1238f298f Merge main into feat/craft-menu-app-menu-labels
main moved the AppKit code into craft-window's native_menu. The minimal app
menu now takes its titles there as an AppMenu (install_app_menu_with), and
craft-menu's mac::app_menu builds them from LayoutOptions. craft-window
escapes every title it hands muda, the platform items' titles included.
2026-11-25 21:17:15 -08:00
bflatastic ed7b213d51 design-lint: clear the four findings on next from #3534, #3541 and #3431
craft-design-lint's workspace test fails on next with four findings in code
that landed before the lint became a hard test:

- draw (#3534): the Bezier overlay's read counter is a thread_local in a module
  gated cfg(all(test, feature)); the global-state rule skips cfg(test) modules
  only, so the gate is split into #[cfg(test)] and #[cfg(feature)], which
  compiles the same code.
- menu (#3541): the macOS menu rebuild retry reads the runtime's clock
  (runtime::motion::now) and asks for its frame through
  runtime::frame::request_repaint_after instead of Instant::now and
  Context::request_repaint_after.
- ui-panels (#3431): Prompt::layer_role was a hand-written setter; the field is
  now #[prop(vis = "pub(super)")].
2026-11-26 11:39:35 +07:00
BFlat b6ca1de062 Merge pull request #2955 from dotCooCoo/feat/menu-bar-natural-width
Menu bar: the output reports the width every title takes side by side
2026-11-26 10:24:42 +07:00
BFlat fb46021c51 Merge pull request #3586 from dotCooCoo/fix/shortcuts-tab-strip-names
menu: Keyboard Shortcuts' tab strips have readable names
2026-11-26 10:01:31 +07:00
BFlat 491fb985f0 Merge pull request #3541 from dotCooCoo/fix/mac-menu-retry-failed-build
menu: a macOS menu rebuild that fails is tried again
2026-11-26 09:59:10 +07:00
Martin BallandClaude Opus 5.5 0960ed8d85 menu gallery: stroke the current tile's edge over its fill; caption in accent.on_soft
A translucent accent.soft over an accent.solid fill read as a solid block, and text.normal on accent.soft has no
guaranteed contrast. The fill is now the whole tile and the edge a thin stroke inside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:55:16 +00:00
Martin BallandClaude Opus 5.5 4bc277f544 menu gallery: the current tile is an accent.soft fill with a 1 pt accent.solid edge
The fill keeps the tile reading as current under the focus ring, as WordCraft v0.18.1 drew it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:42:31 +00:00
dotCooCoo 702cb295c6 menu: Keyboard Shortcuts' tab strips have readable names
The tab strips in the Keyboard Shortcuts dialog used their id salts as
names, so a screen reader announced the area tabs as "shortcuts.area"
and the app's page tabs as "shortcuts.tab". The area tabs are now named
with the Show select's translated label, and the page tabs with the
dialog's title. The id salts are unchanged.
2026-11-25 14:42:07 -08:00
skylartaylor 1ac076647a menu tests: the wider-pane trial records why neither dialog stacks the pane's columns
A stacked grid would give the caps the whole width and the narrower dialog would draw the taller keys, so the trial's comparison only shows the proportions when both dialogs keep the two columns beside each other. The least widths say they do: 18.5 control heights for the caps and the hint's readable least for the shortcut column, against 684 points of room in the 700 point dialog.
2026-11-25 18:24:37 +01:00
skylartaylor b7c7183325 menu: the keyboard pane measures through MeasureCx::picture_size
The pane worked its height out of `cx.room` by hand, which falls back to the least when the caps are measured in a column that offers no room, and which took the room even at `Proposal::Min`. `picture_size` keeps the least when there is no room or the measure is a least one, and tells the column to sweep again when the pane shows wider than it measured.
2026-11-25 18:23:51 +01:00
skylartaylor 4c853b1077 The keyboard pane takes its height from its width, so its keys grow with the dialog; Options::keyboard_height is gone
The caps keep their proportions, 18.5 units across the pane and 6.25 down it: the pane is as tall
as the width it is given makes the keys, and a pane narrower than the keys ask for keeps the least
height, so a key is never smaller than a control. An app no longer sets a least height for the
keys, and the pane's least height field goes with it.

Trial removed with the option: the least height pane_like_an_app set. Trial added:
a_wider_pane_is_taller_and_its_keys_stand_above_a_control (a dialog of 950 points draws a taller
key than one of 700, above the height of the footer's OK button).
2026-11-25 17:54:05 +01:00
dotCooCoo a834f744e6 menu: a macOS menu rebuild that fails is tried again
When AppKit could not rebuild the menu bar, the old menus stayed up but
nothing tried the rebuild again: NativeBar::apply returned false for a
failed rebuild and for an update in place alike, and the driver had
already recorded the new menus as synced.

- craft-window: NativeBar::failed reports a rebuild that failed.
- craft-menu: RebuildRetry tries menus whose build failed once more
  REBUILD_RETRY (one second) after the failure; when that fails too,
  they are not built again until they change.
- The macOS backend keeps the menus pending after a failed rebuild and
  asks egui for a repaint when the retry is due, asking again on each
  frame before then.

Carries the fix from storytold/vectorcraft#9056.
2026-11-25 08:53:39 -08:00
skylartaylor f76d8bfba9 Shortcuts keyboard trials open the pane the way an app does (a size and a least keyboard height), and the hint check measures the block's real end 2026-11-25 16:57:09 +01:00
skylartaylor 7a7984635e Merge remote-tracking branch 'origin/next' into design-port/pr-dialog-looks
Conflicts resolved in next's shape:
- ui-widgets tile_grid/mod.rs: next added CardText::Page with a strong name;
  Preset keeps this branch's strong name beside it.
- ui-widgets tile_grid/tile.rs: the pick ring outline stays, skipped on next's
  page cards (they draw their own accent edge); page cards stay flat.
- ui-widgets tests tile_grid/tile.rs: both trials kept, this branch's
  a_preset_cards_name_is_strong and next's page card wrapping trial.
- docs/contract-api.md: next's wording for focus::host_canvas, and the
  focus::is_focused line this branch's regeneration listed (the function is
  public in the source).
2026-11-25 15:21:19 +01:00
Martin BallandClaude Opus 5.5 3b36acc52b menu gallery: the current tile's outline is accent.solid, not the translucent accent.border
Several themes pin accent.border translucent so it reads on a control's own fill (Adwaita, Breeze, Soft,
Studio, Solarized Dark). The current tile has no fill now, so that outline sat at 1.6 to 2.6:1 on the ribbon,
under the 3:1 a state mark needs. accent.solid is what the other selection outlines take (table cells,
graph nodes, timeline clips). Also drops the tile style's stale note about a selection fill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:32:25 +00:00
Martin BallandClaude Sonnet 5.5 4c6c3bb6e1 menu gallery: scroll and more arrows show the small glyph, not the ribbon's icon side
The Styles gallery's up, down and more buttons are icon buttons, and in a ribbon an icon-only button's glyph takes
the ribbon's small icon side (17), which made the arrows far larger than the old ribbon's. A new
GlyphRole::Compact shows the glyph at size.icon.glyph_sm whatever the control size and skips that ribbon side;
the gallery sets it on its three buttons, and on the one it measures. Other icon buttons are unchanged.
Reference: storytold/wordcraft#7679.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 09:57:07 +00:00
Martin BallandClaude Sonnet 5.5 7f8fec0e54 menu gallery: the current tile is outlined in the accent, with no fill
The current tile of a gallery was a state.selected fill inside a line.control_edge edge, which on the Styles
gallery read as a grey tile. It is now a thin outline in accent.border, the colour a selected icon button's
outline takes, and the tile keeps its own background. The outline is still a shape, so the current tile
is not marked by colour alone. Reference: storytold/wordcraft#7678.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-25 09:49:06 +00:00
skylartaylor b088bbd0e6 shortcuts: drop Options::width; next's Options::size opens the dialog at a size the app chooses. Keep keyboard_height. Drop the a_named_width_opens_the_dialog_at_it trial, which next's an_editable_dialog_opens_at_the_size_the_app_gives covers 2026-11-25 10:13:42 +01:00
BFlat 16001e7210 Merge pull request #3432 from dotCooCoo/fix/shortcuts-own-areas 2026-11-25 12:32:04 +07:00