Repository navigation
feat(core,app): page switches, page deletion and per-profile global pages (#156) - #208
Merged
Merged
Conversation
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slice 10 of the beta epic #180 (plan QUB-633, revision 2). A page can be switched off with
enabled = false: it keeps its keys and gets no index. An app profile can leave out the global pages withglobal_pages = falsein[profile]. The app adds, renames, reorders, switches and deletes pages through the round-trip editor, with an undo.Closes #156
Changes
profile.rs,state.rs,schemas/profile.schema.json):enabledon a[[pages]]entry andglobal_pagesin[profile], both defaulttrue.PageList::ofskips disabled pages and keeps the context page whatever its flag. It starts at index 1 for a profile withglobal_pages = false; the global profile ignores the field. Without acontextpage, the first enabled page is the context page.state::page_listexposes the list for the shared fixture.edit.rs):ProfileDocument::edit_pagetakes aPageEdit(add,rename,move,enable,delete) and answers the page's new number and the inverse edit. A move swaps the tables' places in the file, so a page takes its comments and keys along.EditError::Protectedrefuses disabling the context page and deleting the only enabled page.ProfileFieldsgainsglobal_pages.editor.rs,profiles.rs):Editor::edit_page(snapshot, then the atomic write) andEditor::restore.restoreonly accepts a snapshot from the editor's own directory and of the same profile; it is the undo of a delete.ProfileSummarygainsdisabledandglobal_pages.tests/protocol-fixtures/editor/):pages.jsonwithpages.tomlandpages.1.tomltopages.6.toml, one file per step;page-list.json, the cases bothpage_listand the app'spageListmust give; a third header stepglobal_pages(terminal.global.toml).edit_pageandrestore_profile.lib/profiles.ts:pageListandcontextPagefollowPageList::of.+.+ pageand an Undo, plus a "Show the global pages" checkbox for app profiles.global_pages; §7.2 the two fields; §10 the tab strip and the Profiles page list; changelog.CONTEXT.md: Page list and Context page.docs/design/gui-ux.md: §3.1 tab strip, §3.2 page management.docs/beta-test.md: block feat(core,app): page switches, page deletion and per-profile global pages (#156) #208.docs/roadmap.md: row 10.Automated checks
just fmt-checkjust lint(clippy-D warnings)just test(833 passed, 1 skipped)just deny(advisories, bans, licenses, sources ok)just app-test(svelte-check 0 errors, vitest 2692 passed, audit clean, app deny ok)User test
Owner, host, the daemon, the app (
docs/beta-test.md, section 5, block #208).appsoff on the global profile: the tab goes muted, the pad's left button skips it (general, then nothing), the file hasenabled = falseon that page with its keys intact. Switch it on: back.global_pages = falseon the VS Code profile in the app: under VS Code the left button does nothing at index 1; Konsole still has the global pages.tools, move it up, delete it: the file after each step differs only in that page; the pad follows (the new page reachable with the right button).Notes for reviewer
context, the context page is now the first enabled page, not the first page; a page namedcontextthat is disabled is still the context page and stays in the list. The editor refusesenabled = falseon it; the loader does not, so a hand edit has no effect rather than an error.restore_profile); the other page ops undo by the inverse edit the answer carries. The Profiles screen keeps one level of undo; a header write clears it, as a restore would roll that write back too.pages = [...]arrays: rename and enable work; add, move and delete answer the editor'sShapeerror ("edit in a text editor").appjob; the sandbox has no webkit2gtk.