Skip to content

fix: persist horizontal/vertical layout orientation across page refreshes - #175

Merged
MathiasVDA merged 4 commits into
mainfrom
copilot/keep-horizontal-vertical-mode
Sep 12, 2026
Merged

MathiasVDA merged 4 commits into
mainfrom
copilot/keep-horizontal-vertical-mode

Conversation

Copilot AI commented Sep 12, 2026

Copy link
Copy Markdown

The layout orientation (horizontal/vertical) toggled by the user was stored only in config.orientation in memory and lost on page reload.

Changes

  • PersistentConfig — Added getOrientation() / setOrientation() to read/write orientation in localStorage alongside other persisted settings.
  • Tab.toggleOrientation() — Calls persistentConfig.setOrientation() after updating the in-memory config, so the choice is persisted on every toggle.
  • Yasgui constructor — Reads the persisted orientation on init and applies it to config.orientation before tabs are rendered, using the same pattern as showSnippetsBar.

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
Copilot AI requested a review from MathiasVDA September 12, 2026 14:49
@MathiasVDA
MathiasVDA requested a lite review from Copilot September 12, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 to PersistentConfig on each toggle.
  • Updated Yasgui constructor to restore persisted orientation into config.orientation during 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.

Comment thread packages/yasgui/src/PersistentConfig.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@MathiasVDA
MathiasVDA marked this pull request as ready for review September 12, 2026 15:42
@MathiasVDA
MathiasVDA merged commit 8376184 into main Sep 12, 2026
2 checks passed
@MathiasVDA
MathiasVDA deleted the copilot/keep-horizontal-vertical-mode branch September 12, 2026 15:44
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>
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.

Keep horizontal/vertical mode after refreshing page

3 participants