-
Notifications
You must be signed in to change notification settings - Fork 0
fix(sidebar): default the desktop sidebar to collapsed #1637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2d7ea51
fix(sidebar): default the desktop sidebar to collapsed
claude f101a40
fix(test): assert the collapsed rail, not the absent expanded panel
claude aef0d25
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 65f81cf
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 74c3dd1
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 691c878
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 4609400
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo a0eec32
fix(test): seed sidebar preference in journeys vacated by default flip
cursoragent baeb010
Merge remote branch tip into bugbot test fixes
cursoragent 7fd7e98
docs(sidebar): clarify null preference collapses for returning browsers
cursoragent ea93d0b
chore(ci): retrigger PR checks after Actions infra flake
cursoragent 493b4f3
fix(sidebar): harden default-collapsed coverage after review (#1637)
cursoragent 84ce8fe
Merge remote PR tip into review fixes
cursoragent bf2159b
Merge origin/main into sidebar default PR
cursoragent 8fd65e8
chore(ci): retrigger checks after stuck Actions run (#1637)
cursoragent d481c87
chore(ci): retrigger required checks after Actions outage (#1637)
cursoragent fa617c0
chore(ci): retrigger required checks (Actions gradual recovery) (#1637)
cursoragent 74f58f5
ci: retrigger after Actions queue timeout
cursoragent b3c4500
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 7bfb141
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 091c7f5
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo f8e6d68
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 79826ea
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 6b7df2a
fix(ui-smoke): expand sidebar before desktop settings scroll test
cursoragent b324f38
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 5847fbd
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo 4f20f6d
Merge branch 'main' into claude/sidebar-closed-default-i6n2fk
BigSimmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { describe, expect, it } from "vitest"; | ||
| import { | ||
| readSidebarCollapsedPreference, | ||
| SIDEBAR_COLLAPSED_STORAGE_KEY, | ||
| } from "../src/components/clinical-dashboard/use-sidebar-collapsed"; | ||
|
|
||
| describe("readSidebarCollapsedPreference", () => { | ||
| it("defaults to collapsed when the preference key is absent", () => { | ||
| expect(readSidebarCollapsedPreference(null)).toBe(true); | ||
| expect(readSidebarCollapsedPreference(undefined)).toBe(true); | ||
| }); | ||
|
|
||
| it("honours an explicit expanded pin", () => { | ||
| expect(readSidebarCollapsedPreference("0")).toBe(false); | ||
| }); | ||
|
|
||
| it("honours an explicit collapsed pin", () => { | ||
| expect(readSidebarCollapsedPreference("1")).toBe(true); | ||
| }); | ||
|
|
||
| it('only treats an explicit "1" as collapsed when a value is present', () => { | ||
| // Preserves the pre-existing ternary: absent → collapsed; otherwise | ||
| // collapsed iff the stored pin is exactly "1". Stale/garbage pins expand. | ||
| expect(readSidebarCollapsedPreference("")).toBe(false); | ||
| expect(readSidebarCollapsedPreference("true")).toBe(false); | ||
| expect(readSidebarCollapsedPreference("collapsed")).toBe(false); | ||
| }); | ||
|
|
||
| it("pins the storage key used by Playwright seeds and the browser store", () => { | ||
| expect(SIDEBAR_COLLAPSED_STORAGE_KEY).toBe("clinical-kb-sidebar-collapsed"); | ||
| }); | ||
| }); |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.