Skip to content

fix(FR-820): compact sidebar doesn't work when refreshing.#3495

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix_FR-820_/compact-sidebar-doesn_t-work
Apr 14, 2025
Merged

fix(FR-820): compact sidebar doesn't work when refreshing.#3495
graphite-app[bot] merged 1 commit into
mainfrom
fix_FR-820_/compact-sidebar-doesn_t-work

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented Apr 14, 2025

resolves #3340, #3496 (FR-820)

Remove redundant onCollapse handler in MainLayout to keep sidebar collapse after refreshing

This PR removes the redundant onCollapse handler from the MainLayout component. The handler was setting the sideCollapsed state, which is already being handled by the existing onBreakpoint function.

Minimum requirements to check during review

  • wide screen
    • if compact sidebar is true, keep compact sidebar after refreshing.
    • if compact sidebar is false, sidebar always expanded.
  • middle screen
    • always compact sidebar
  • narrow screen
    • always hidden sidebar

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review: toggle Use Compact Sidebar by default in usersettings page.
  • Test case(s) to demonstrate the difference of before/after

Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions Bot added the size:XS ~10 LoC label Apr 14, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.18% 409/9781
🔴 Branches
3.55% (-0% 🔻)
240/6767
🔴 Functions 2.54% 79/3111
🔴 Lines 4.12% 394/9566

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 99a2905

Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

The collapse button doesn't work.

@agatha197 agatha197 force-pushed the fix_FR-820_/compact-sidebar-doesn_t-work branch from 39abc29 to 295ed39 Compare April 14, 2025 07:36
Copy link
Copy Markdown
Contributor Author

fixed!

@agatha197 agatha197 requested a review from ironAiken2 April 14, 2025 07:37
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yomybaby yomybaby force-pushed the fix_FR-820_/compact-sidebar-doesn_t-work branch from 295ed39 to 10fe1ef Compare April 14, 2025 09:28
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added size:S 10~30 LoC and removed size:XS ~10 LoC labels Apr 14, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 14, 2025

Merge activity

resolves #3340, #3496 ([FR-820](https://lablup.atlassian.net/browse/FR-820))

## Remove redundant `onCollapse` handler in MainLayout to keep sidebar collapse after refreshing

This PR removes the redundant `onCollapse` handler from the MainLayout component. The handler was setting the `sideCollapsed` state, which is already being handled by the existing `onBreakpoint` function.

### Minimum requirements to check during review
- wide screen
  - [ ] if compact sidebar is true, keep compact sidebar after refreshing.
  - [ ] if compact sidebar is false, sidebar always expanded.
- middle screen
  - [ ] always compact sidebar
- narrow screen
  - [ ] always hidden sidebar

**Checklist:**

- [ ] Documentation
- [ ] Minium required manager version
- [x] Specific setting for review (eg., KB link, endpoint or how to setup)
- [x] Minimum requirements to check during review: toggle `Use Compact Sidebar by default` in usersettings page.
- [ ] Test case(s) to demonstrate the difference of before/after

[FR-820]: https://lablup.atlassian.net/browse/FR-820?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the fix_FR-820_/compact-sidebar-doesn_t-work branch from 10fe1ef to 99a2905 Compare April 14, 2025 09:31
@graphite-app graphite-app Bot merged commit 99a2905 into main Apr 14, 2025
5 of 6 checks passed
@graphite-app graphite-app Bot deleted the fix_FR-820_/compact-sidebar-doesn_t-work branch April 14, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Compact Sidebar by default doesn't work

3 participants