-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1688): custom logo path setting and preview feature #4837
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
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.23% | 496/11718 |
| 🔴 | Branches | 3.66% | 298/8149 |
| 🔴 | Functions | 2.55% | 92/3604 |
| 🔴 | Lines | 4.21% | 482/11460 |
Test suite run success
144 tests passing in 13 suites.
Report generated by 🧪jest coverage report action from b46ac74
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 adds a comprehensive logo customization feature to the User Settings page, enabling users to customize WebUI logos for different display modes (light/dark) and sidebar states (expanded/collapsed).
Key Changes
- New
LogoPreviewercomponent that handles logo uploads (max 2MB) and path inputs with real-time preview - Logo preview functionality via a separate window that uses sessionStorage flags and localStorage event listeners
- Integration with existing theme customization system, storing logos as base64 in localStorage
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/i18n/*.json | Added translations for logo customization UI in 18 languages including section titles, descriptions, and field labels |
| react/src/hooks/useBAISetting.tsx | Extended UserSettings interface with preview_logo_path field of type PreviewLogoConfig |
| react/src/components/MainLayout/WebUISider.tsx | Added preview mode detection, localStorage event listener for cross-window updates, and conditional logo rendering based on theme and preview mode |
| react/src/components/BrandingSettingList.tsx | Added logo customization section with 4 logo variants, moved preview button to extraButton prop, and implemented logo-specific reset logic |
| react/src/components/BrandingSettingItems/LogoPreviewer.tsx | New component implementing file upload with size validation, path input with debouncing, and integration with theme config system |
8ef4a66 to
2a6d699
Compare
nowgnuesLee
left a comment
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.
I think the PR title should be changed from maintenance page to configuration page.
react/src/components/BrandingSettingItems/EditableImagePath.tsx
Outdated
Show resolved
Hide resolved
2a6d699 to
552ca29
Compare
a9a7a71 to
173bd7a
Compare
552ca29 to
7b7f2e2
Compare
173bd7a to
6462708
Compare
7b7f2e2 to
08433d3
Compare
08433d3 to
44e7f6d
Compare
44e7f6d to
8756a39
Compare
nowgnuesLee
left a comment
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.
please resolve the merge conflicts
8756a39 to
8304832
Compare
yomybaby
left a comment
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
nowgnuesLee
left a comment
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
8304832 to
cf04c72
Compare
Merge activity
|
### resolve #4838 [FR-1688](https://lablup.atlassian.net/browse/FR-1688?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ) Add Logo Customization Feature to User Settings This PR adds a new logo customization feature to the user settings, allowing users to customize the WebUI logo for different modes: - Light mode logo - Dark mode logo - Collapsed sidebar logo in light mode - Collapsed sidebar logo in dark mode Users can either upload an image file (max 2MB) or specify a path to the logo. The uploaded logos are stored as base64 strings in local storage and can be previewed in real-time using the theme preview feature. The implementation includes: - A new `LogoPreviewer` component for handling logo uploads and path inputs - Integration with the existing theme customization system - Real-time preview capability for uploaded logos - Support for both light and dark modes in normal and collapsed sidebar states All translations for the new feature have been added to the i18n files in multiple languages. **Checklist:** - [x] Documentation - [ ] Minium required manager version - [x] Specific setting for review (User Settings > Logo section) - [x] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after [FR-1688]: https://lablup.atlassian.net/browse/FR-1688?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
cf04c72 to
b46ac74
Compare

resolve #4838 FR-1688
Add Logo Customization Feature to User Settings
This PR adds a new logo customization feature to the user settings, allowing users to customize the WebUI logo for different modes:
Users can either upload an image file (max 2MB) or specify a path to the logo. The uploaded logos are stored as base64 strings in local storage and can be previewed in real-time using the theme preview feature.
The implementation includes:
LogoPreviewercomponent for handling logo uploads and path inputsAll translations for the new feature have been added to the i18n files in multiple languages.
Checklist: