Skip to content

Ribbon: Excel layout parity on every tab — group captions, order and missing groups - #1767

Closed
alosslessdev wants to merge 2 commits into
storytold:mainfrom
alosslessdev:ribbon/excel-layout-parity
Closed

alosslessdev wants to merge 2 commits into
storytold:mainfrom
alosslessdev:ribbon/excel-layout-parity

Conversation

@alosslessdev

Copy link
Copy Markdown
Contributor

Fixes #1764.

Every tab of the ribbon now lays out like Excel's: real groups with the group's caption under them, Excel's group order and control order inside each group, a separator between groups, and Excel's dialog launcher in a group's bottom-right corner wherever Excel has one and GridCraft has the dialog. A feature GridCraft lacks takes no space at all — the cluster is just narrower and everything after it moves left, so the blank area collects at the right end of the ribbon as in Excel.

Reference: side-by-side captures of every Excel and GridCraft tab, plus black-box observation of the installed Excel (per AGENTS.md; nothing of Office's is in the commit).

What changed

New ribbon primitive in crates/ui-egui/src/ribbon.rs: group() wraps each cluster in a fixed-height group — controls packed top-left over a caption band, captions aligned along the ribbon bottom — plus inner_sep() for the dividers Excel draws inside a group (Font before Borders, Number before the decimals). The ribbon card grows 88 → 100 px for the caption band.

Wired into the layout (all commands already existed in main):

Tab Now in Excel's shape
Home groups + captions; Format Cells launchers on Font/Alignment/Number; internal dividers in Font and Number; Add-ins group (home.addIns) after Editing
Insert order Tables → Illustrations → Controls → Charts → Sparklines → Filters → Links → Comments → Text → Symbols; Recommended PivotTables and PivotChart buttons; Text Box and Header & Footer fold into Excel's Text ⌄ drop-down
Draw Drawing Tools + Convert captions
Page Layout theme Colors/Fonts/Effects beside Themes; Background in Page Setup; Scale to Fit group (Width, Height, Scale wired to pageLayout.scaleToFit); Arrange group (Bring Forward/Send Backward with their To Front/To Back menus, Selection Pane, Align ⌄, Group, Rotate ⌄)
Formulas Recently Used ⌄ in the Function Library; launchers on Function Library and Defined Names
Data Get & Transform Data (Get Data + From Text/CSV / From Table/Range), Queries & Connections (Refresh All, Queries & Connections), Advanced in Sort & Filter, Consolidate in Data Tools, trailing Analysis group (Data Analysis, Solver)
Review Thesaurus in Proofing; Previous/Next Comment as standard buttons
View Workbook Views (+ Custom Views), Dark Mode ▸ Switch Modes, Show columns as Excel stacks them, Window group (New Window, Arrange All, Freeze Panes ⌄, Split, Hide, Unhide, Switch Windows), Macros group (View Macros…, Record Actions); GridCraft's own settings trail in an Application group
Automate Scripting Tools (All Scripts, Record Actions); the agent tools trail in a GridCraft group; Macros moved to View where Excel has it
Table Design, Chart Design groups + captions from the catalog

Deliberate omissions

Features the repo doesn't implement leave no hole (issue #1764's rule): Sensitivity, Forms, 3D Models, SmartArt, Screenshot, Timeline, WordArt, Equation, Maps, Data Types, From Web/Picture, Properties, Workbook Links, Sheet View, Side-by-side windows, Unshare Workbook, New Script (needs a name and commands that only the control channel and CLI pass), and the Help tab. Drop-downs whose contents are missing stay plain buttons (Link, PivotTable's From… menu). Rotate ⌄ carries only the flips arrange.rotate implements. The theme Effects menu is wired to pageLayout.themeEffects, whose engine side is still a no-op. Arrange buttons act on the selected chart; other objects go through the Selection Pane (the grid has no single object selection yet).

Two kept extras where GridCraft's control behaves like a drop-down even though the reference Excel shows none: Font keeps Strikethrough (the reference build keeps it in Format Cells only), and Symbol keeps its chevron because clicking it opens the symbol gallery.

Verification

  • cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings clean
  • cargo test -p gridcraft-ui-egui passes (the keytip, layout-sensitive and system-theme suites included)
  • cargo xtask ci passes
  • Every tab smoke-tested against the running app via the control channel (ui.ribbon, ui.screenshot) and compared with the Excel captures

docs/ui-parity.md updated (timestamp, ribbon rows, revision history). contributors/people.toml carries my own entry, per AGENTS.md.

@alosslessdev

Copy link
Copy Markdown
Contributor Author

This was tested on a 1920x1080 display with maximized windows on both excel and gridcraft

@alosslessdev

Copy link
Copy Markdown
Contributor Author

Superseded by three independent PRs from main: #1795 (group captions + dialog launchers + content-sized groups), #1798 (missing and misplaced groups and controls), #1800 (Text drop-down). Launchers and blank-slot collapse are properties of the group container, so they are part of #1795; stacking separate PRs was not possible because GitHub cannot base a PR on a fork branch when the base repo is upstream. Closing this combined PR in favour of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ribbon layout: group captions, ordering and missing groups vs Excel on every tab

1 participant