Repository navigation
Conversation
`Chrome::new_sheet`, on by default, lets a host that shows a workbook without changing it (a file preview, say) drop the (+) after the sheet tabs: the one editing button in a bar the viewer still needs for switching sheets. Without the button the tabs take its room. Only the button goes. Shift+F11, Insert Sheet in the ribbon and the tab menu, and `home.insertSheet` still add sheets: the ribbon and tab menu offer more structure edits than this one, a host driving commands may add sheets itself, and refusing structure changes is already what a workbook with its structure protected does in the engine. So unlike the File tab, whose Backstage is UI only, nothing behind the button is blocked. The existing `Chrome` literals now fill the rest from the default, so they keep compiling as fields are added.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Upstream PR: storytold#4337 Head: ee198c6
Merges the zcode-pr-transfer branch (61 commits transferring open, not-yet-merged upstream PRs into our fork) into main. Docs (docs/ui-parity.md, docs/file-format-parity.md) resolved in favor of main's current changelog state; code from all transferred PRs carried over cleanly. Commits carried over (21 from this session + 40 earlier transfers): storytold#4408, storytold#4405, storytold#4406, storytold#4386, storytold#4379, storytold#4378, storytold#4376, storytold#4375, storytold#4373, storytold#4370, storytold#4369, storytold#4348, storytold#4347, storytold#4345, storytold#4344, storytold#4343, storytold#4341, storytold#4340, storytold#4337, storytold#4336, storytold#4318, storytold#4316, storytold#4315, storytold#4312, storytold#4310, storytold#4307, storytold#4306, storytold#4305, storytold#4303, storytold#4298, storytold#4295, storytold#4287, storytold#4286, storytold#4257, storytold#4256, storytold#4254, storytold#4252, storytold#4251, storytold#4248, storytold#4244, storytold#4243, storytold#4229, storytold#4228, storytold#4227, storytold#4225, storytold#4221, storytold#4220, storytold#4219, storytold#4217, storytold#4424, storytold#4423, storytold#4420, storytold#4419, storytold#4418, storytold#4414, storytold#3617, storytold#2642, storytold#2556, storytold#2321
Adds
Chrome::new_sheetnext totitle_barandfile_tab. It defaults totrue, so nothing changes for GridCraft itself.We show workbooks read-only in a file preview. The sheet tabs are still how people move between sheets there, but the (+) after them offers a change the preview can't keep. With
new_sheet: falsethe button and its gap are not drawn, and the tabs take that room up to the split handle.Only the button goes. Shift+F11, Insert Sheet in the ribbon and the tab menu, and
home.insertSheetstill add sheets. The tab menu also offers Delete, Rename, Move or Copy and Hide, so refusing just the insert would not make the structure read-only. A protected workbook structure already refuses these in the engine, and a host-controlled read-only session is being worked on in #2354 and #2788. #3858 makes the same choice for the ribbon.#3858 also adds a field to
Chrome, so whichever merges second has a one-line conflict on the field,Default, the?chrome=noneliteral and the end ofhost_chrome.rs. This PR writes the existingChromeliterals with..Default::default(), so a later field won't need to touch them.Tests: two in
host_chrome.rsand one intab_split.rs. The button and layout tests fail against main'stabs.rs; the Shift+F11 test pins that only the button is left out.cargo test -p gridcraft-ui-egui,cargo fmt --check,cargo clippy -p gridcraft-ui-egui -p gridcraft-web --all-targets -- -D warningsandcargo xtask wasmpass, except three ui-egui tests that fail the same way on main on a machine without craft-fonts (missing glyphs). I haven't run the fullcargo xtask ci.Summary by CodeRabbit