Skip to content
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

feat: NEO sider's toggle button and refactoring #2853

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Nov 15, 2024

image.png

Changes:

  • Added keyboard shortcut '[' to toggle sidebar collapse state
  • Introduced a collapsible button on the sidebar that appears on hover
  • Moved sidebar footer content into a more structured layout
  • Added useKeyboardShortcut hook to handle keyboard shortcuts when no input is focused
  • Refactored BAISider component to use forwardRef and improve layout structure
  • Standardized sidebar width constants (COLLAPSED_SIDER_WIDTH = 74, SIDER_WIDTH = 240)
  • Removed bottomText prop from BAISider in favor of direct content rendering
  • Added hover detection for showing/hiding the collapse toggle button

Testing Requirements:

  1. Verify the '[' keyboard shortcut toggles sidebar when no input is focused
  2. Check that the collapse button appears on sidebar hover
  3. Confirm sidebar footer content displays correctly in both expanded/collapsed states
  4. Test that keyboard shortcuts don't trigger when inputs or modals are focused

Copy link

graphite-app bot commented Nov 15, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

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

@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch 2 times, most recently from b2825e2 to f7c1327 Compare November 15, 2024 07:34
@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Nov 15, 2024
@yomybaby yomybaby marked this pull request as ready for review November 15, 2024 07:36
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch 2 times, most recently from 9f465cc to e79c472 Compare November 15, 2024 07:44
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch from e79c472 to e4c88ef Compare November 16, 2024 03:01
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch from e4c88ef to 7f136aa Compare November 16, 2024 03:29
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch from 7f136aa to eb4ea48 Compare November 17, 2024 00:20
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch 3 times, most recently from 930d3ba to 236b757 Compare November 18, 2024 02:27
Copy link
Contributor

@lizable lizable left a comment

Choose a reason for hiding this comment

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

LGTM. works fine!

Copy link

graphite-app bot commented Nov 20, 2024

Merge activity

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/XqC2uNFuj0wg8I60sMUh/c3c9b8e7-7063-4fb9-b717-c805530a5a43.png)

**Changes:**
- Added keyboard shortcut '[' to toggle sidebar collapse state
- Introduced a collapsible button on the sidebar that appears on hover
- Moved sidebar footer content into a more structured layout
- Added `useKeyboardShortcut` hook to handle keyboard shortcuts when no input is focused
- Refactored BAISider component to use forwardRef and improve layout structure
- Standardized sidebar width constants (COLLAPSED_SIDER_WIDTH = 74, SIDER_WIDTH = 240)
- Removed bottomText prop from BAISider in favor of direct content rendering
- Added hover detection for showing/hiding the collapse toggle button

**Testing Requirements:**
1. Verify the '[' keyboard shortcut toggles sidebar when no input is focused
2. Check that the collapse button appears on sidebar hover
3. Confirm sidebar footer content displays correctly in both expanded/collapsed states
4. Test that keyboard shortcuts don't trigger when inputs or modals are focused
@yomybaby yomybaby force-pushed the feature/webui-neo-toggle-sider branch from 4541f88 to 33f7fba Compare November 20, 2024 06:58
Base automatically changed from feature/neo-sider to main November 20, 2024 07:04
@graphite-app graphite-app bot merged commit 33f7fba into main Nov 20, 2024
4 checks passed
@graphite-app graphite-app bot deleted the feature/webui-neo-toggle-sider branch November 20, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MainLayout NEO: Sider
2 participants