fix: persist horizontal/vertical layout orientation across page refreshes - #175
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Maintain horizontal/vertical mode after page refresh
fix: persist horizontal/vertical layout orientation across page refreshes
Sep 12, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Persisted orientation values need runtime validation to prevent invalid/untyped localStorage contents from breaking initial layout state.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Persists the user-selected Yasgui layout orientation (horizontal/vertical) across page refreshes by storing it in PersistentConfig and restoring it during Yasgui initialization before tabs render.
Changes:
- Added
PersistentConfig.getOrientation()/setOrientation()to persist orientation in storage. - Updated
Tab.toggleOrientation()to write the new orientation toPersistentConfigon each toggle. - Updated
Yasguiconstructor to restore persisted orientation intoconfig.orientationduring startup.
File summaries
| File | Description |
|---|---|
| packages/yasgui/src/Tab.ts | Persists the updated orientation when the user toggles layout. |
| packages/yasgui/src/PersistentConfig.ts | Adds getter/setter for storing orientation alongside other persisted settings. |
| packages/yasgui/src/index.ts | Restores persisted orientation during initialization before tabs are created/rendered. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
MathiasVDA
marked this pull request as ready for review
September 12, 2026 15:42
MathiasVDA
added a commit
that referenced
this pull request
Sep 12, 2026
…shes (#175) * Initial plan * fix: persist horizontal/vertical orientation across page refreshes * fix: add JSDoc comments to getOrientation/setOrientation * Improve getOrientation method implementation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
MathiasVDA
added a commit
that referenced
this pull request
Sep 12, 2026
…end the result (fixes #176) * Initial plan * feat: Ctrl+Click URI in response plugin runs DESCRIBE and appends result * refactor: surface DESCRIBE failures in response view and tighten typing * refactor: reuse showMore for revealing appended DESCRIBE content * feat: don't describe but retrieve all triples where uri is subject of * docs: also the docker image has been renamed * chore: update prefixes * fix: persist horizontal/vertical layout orientation across page refreshes (#175) * Initial plan * fix: persist horizontal/vertical orientation across page refreshes * fix: add JSDoc comments to getOrientation/setOrientation * Improve getOrientation method implementation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Fix offset condition in extractUriAtOffset function Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Modify loading behavior in describeUri method Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
MathiasVDA
added a commit
that referenced
this pull request
Sep 12, 2026
…shes (#175) * Initial plan * fix: persist horizontal/vertical orientation across page refreshes * fix: add JSDoc comments to getOrientation/setOrientation * Improve getOrientation method implementation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
MathiasVDA
added a commit
that referenced
this pull request
Sep 12, 2026
…end the result (fixes #176) * Initial plan * feat: Ctrl+Click URI in response plugin runs DESCRIBE and appends result * refactor: surface DESCRIBE failures in response view and tighten typing * refactor: reuse showMore for revealing appended DESCRIBE content * feat: don't describe but retrieve all triples where uri is subject of * docs: also the docker image has been renamed * chore: update prefixes * fix: persist horizontal/vertical layout orientation across page refreshes (#175) * Initial plan * fix: persist horizontal/vertical orientation across page refreshes * fix: add JSDoc comments to getOrientation/setOrientation * Improve getOrientation method implementation Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Fix offset condition in extractUriAtOffset function Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Modify loading behavior in describeUri method Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Vanden Auweele <mathias@matdata.eu> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
The layout orientation (horizontal/vertical) toggled by the user was stored only in
config.orientationin memory and lost on page reload.Changes
PersistentConfig— AddedgetOrientation()/setOrientation()to read/write orientation in localStorage alongside other persisted settings.Tab.toggleOrientation()— CallspersistentConfig.setOrientation()after updating the in-memory config, so the choice is persisted on every toggle.Yasguiconstructor — Reads the persisted orientation on init and applies it toconfig.orientationbefore tabs are rendered, using the same pattern asshowSnippetsBar.