-
Notifications
You must be signed in to change notification settings - Fork 2.3k
support 2 type of scroll behavior with proper settings #6841
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
Conversation
|
Preview URL: https://6ed63adb.docs-9ba.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors "Appearance" settings to "Interface" settings throughout the application, better reflecting the scope of these settings. The key changes include renaming hooks, routes, and translation keys, while adding new thread scroll behavior functionality with two modes: "Flow" (ChatGPT-style anchoring) and "Sticky" (auto-follow streaming).
Key Changes
- Renamed
useAppearancehook touseInterfaceSettingswith improved storage migration logic - Added thread scroll behavior feature with Flow and Sticky modes, including animated preview components
- Updated all translation files, routes, and UI components to reflect the "Interface" naming
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web-app/src/hooks/useInterfaceSettings.ts | Core hook renamed from useAppearance with added threadScrollBehavior state and migration utilities |
| web-app/src/hooks/useThreadScrolling.tsx | Enhanced with Flow/Sticky scroll mode support and conditional behavior logic |
| web-app/src/containers/ThreadScrollBehaviorSwitcher.tsx | New component with interactive preview animations for scroll behavior selection |
| web-app/src/routes/settings/interface.tsx | Settings page renamed from appearance.tsx with added scroll behavior controls |
| web-app/src/constants/threadScroll.ts | New constants file defining scroll behavior types and validation |
| web-app/src/locales/*/settings.json | Updated translation keys from "appearance" to "interface" across all languages |
Comments suppressed due to low confidence (2)
web-app/src/hooks/useInterfaceSettings.ts:526
- Inconsistent indentation on line 519:
appLeftPanelTextColoris indented with extra spaces compared to surrounding lines.
web-app/src/hooks/useInterfaceSettings.ts:15 - Unused import THREAD_SCROLL_BEHAVIOR.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
web-app/src/locales/en/settings.json:1
- Trailing whitespace on empty lines should be removed.
{
web-app/src/hooks/useInterfaceSettings.ts:15
- Unused import THREAD_SCROLL_BEHAVIOR.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
web-app/src/hooks/useInterfaceSettings.ts:233
- The type assertion on line 232 could be avoided by checking the property existence first. Consider refactoring to:
if (state.threadScrollBehavior !== undefined && !isThreadScrollBehavior(state.threadScrollBehavior))to avoid unnecessary type casting.
web-app/src/hooks/useInterfaceSettings.ts:532 - The hardcoded '#FFF' values for text colors on lines 527-530 should be extracted to named constants (e.g.,
DEFAULT_WHITE_TEXT_COLOR) for better maintainability and consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe Your Changes
Fixes Issues
Self Checklist