Repository navigation
Enable Independent Configuration of Dashboard Logos and Fix Logo Loading Behavior - #3489
Merged
Merged
Conversation
xuang7
marked this pull request as ready for review
June 20, 2025 04:24
This was referenced Jun 26, 2025
xuang7
added a commit
that referenced
this pull request
Jul 4, 2025
### **Purpose:** This PR migrates the configuration storage of UI elements, starting with logos, from static files to the database while preserving the existing logo‐customization feature. Future updates will extend this approach to additional elements. ### **Design Proposal:** Design #3528 **Related PRs:** #3453 - Logos customization UI (default values were defined in separate files and loaded directly; the database only stored updated logos) #3480 - site_settings table schema #3489 - Updated logos customization UI ### **Changes (updated):** - gui/../admin/settings/admin-setting.component.ts/html/scss: add the “Branding” card for logo upload/reset. - gui/..component/dashboard.component.ts: integrate dynamic logo rendering. - gui/../service/admin/settings/admin-settings.service.ts:CRUD API for settings - config-service/../ConfigService.scala: database connection and defaults preload on startup - amber/../dashboard/admin/settings/AdminSettingsResource.scala: REST endpoints for config CRUD ### **Changes (new)** - config/../resource/default.conf: defined logo defaults (and placeholders for future settings) and added config-service section with **always-reset-configurations-to-default-values** = false flag to control database reset behavior - config/../scala/DefaultsConfig.scala: loads defaults from default.conf ### **Demonstration:** The settings page retains its familiar upload interface, now organized under a Branding card: <img width="1555" alt="admin_setting" src="https://github.com/user-attachments/assets/60264dab-356a-413f-8f05-9a2fd1c8c541" /> --------- Co-authored-by: Xinyuan Lin <[email protected]>
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
…ing Behavior (apache#3489) ### **Purpose:** - Introduce three independent site‐wide settings, logo, mini logo, and favicon, admin can customize the expanded sidebar logo, the collapsed sidebar icon, and the browser tab icon. - Provide a default fallback for each asset and support individual resets. - Eliminate the brief “flash” of default assets on page reload by applying both logo and mini logo before the main dashboard renders. ### **Changes** - In admin-settings.service.ts: moved all logo-path and favicon-path retrieval into the service, with default fallbacks. - In admin-settings.component.ts/html: Split out three file inputs and previews for logo, mini logo, and favicon, update changes and reset methods. - In dashboard.component.ts/html: Simply subscribe to loadLogos()), ensuring the sidebar only displays once the final URLs are available. ### **Demonstration** Default logo, mini logo, and favicon. <img width="1667" alt="logo1" src="https://github.com/user-attachments/assets/57c0e47e-d58d-46f9-a298-a6d84db314fb" /> <img width="43" alt="mini1" src="https://github.com/user-attachments/assets/a80adef0-6344-4fde-898c-5c7386a0c2c5" /> <img width="110" alt="favicon1" src="https://github.com/user-attachments/assets/5c7964d0-dace-44c4-9054-cbaf42bf619a" /> Admin update in Settings <img width="882" alt="change" src="https://github.com/user-attachments/assets/f0422fef-cfbb-423d-923f-82ffe4c500cb" /> Dashboard after Save <img width="1293" alt="logo2" src="https://github.com/user-attachments/assets/1b3fee1b-8d23-4ce2-94eb-365a7028bc80" /> <img width="44" alt="mini2" src="https://github.com/user-attachments/assets/47aaa3d3-13cb-46c7-802d-e22b471afc80" /> <img width="113" alt="favicon2" src="https://github.com/user-attachments/assets/8e392a33-94b3-40b2-9f26-4186e3fae7e6" /> Hard Refresh https://github.com/user-attachments/assets/f0959dca-7ae9-4f7d-bd0a-12e09786a9ac --------- Co-authored-by: Xinyuan Lin <[email protected]>
SarahAsad23
pushed a commit
to madisonmlin/texera
that referenced
this pull request
May 20, 2026
### **Purpose:** This PR migrates the configuration storage of UI elements, starting with logos, from static files to the database while preserving the existing logo‐customization feature. Future updates will extend this approach to additional elements. ### **Design Proposal:** Design apache#3528 **Related PRs:** apache#3453 - Logos customization UI (default values were defined in separate files and loaded directly; the database only stored updated logos) apache#3480 - site_settings table schema apache#3489 - Updated logos customization UI ### **Changes (updated):** - gui/../admin/settings/admin-setting.component.ts/html/scss: add the “Branding” card for logo upload/reset. - gui/..component/dashboard.component.ts: integrate dynamic logo rendering. - gui/../service/admin/settings/admin-settings.service.ts:CRUD API for settings - config-service/../ConfigService.scala: database connection and defaults preload on startup - amber/../dashboard/admin/settings/AdminSettingsResource.scala: REST endpoints for config CRUD ### **Changes (new)** - config/../resource/default.conf: defined logo defaults (and placeholders for future settings) and added config-service section with **always-reset-configurations-to-default-values** = false flag to control database reset behavior - config/../scala/DefaultsConfig.scala: loads defaults from default.conf ### **Demonstration:** The settings page retains its familiar upload interface, now organized under a Branding card: <img width="1555" alt="admin_setting" src="https://github.com/user-attachments/assets/60264dab-356a-413f-8f05-9a2fd1c8c541" /> --------- Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
…ing Behavior (apache#3489) ### **Purpose:** - Introduce three independent site‐wide settings, logo, mini logo, and favicon, admin can customize the expanded sidebar logo, the collapsed sidebar icon, and the browser tab icon. - Provide a default fallback for each asset and support individual resets. - Eliminate the brief “flash” of default assets on page reload by applying both logo and mini logo before the main dashboard renders. ### **Changes** - In admin-settings.service.ts: moved all logo-path and favicon-path retrieval into the service, with default fallbacks. - In admin-settings.component.ts/html: Split out three file inputs and previews for logo, mini logo, and favicon, update changes and reset methods. - In dashboard.component.ts/html: Simply subscribe to loadLogos()), ensuring the sidebar only displays once the final URLs are available. ### **Demonstration** Default logo, mini logo, and favicon. <img width="1667" alt="logo1" src="https://github.com/user-attachments/assets/57c0e47e-d58d-46f9-a298-a6d84db314fb" /> <img width="43" alt="mini1" src="https://github.com/user-attachments/assets/a80adef0-6344-4fde-898c-5c7386a0c2c5" /> <img width="110" alt="favicon1" src="https://github.com/user-attachments/assets/5c7964d0-dace-44c4-9054-cbaf42bf619a" /> Admin update in Settings <img width="882" alt="change" src="https://github.com/user-attachments/assets/f0422fef-cfbb-423d-923f-82ffe4c500cb" /> Dashboard after Save <img width="1293" alt="logo2" src="https://github.com/user-attachments/assets/1b3fee1b-8d23-4ce2-94eb-365a7028bc80" /> <img width="44" alt="mini2" src="https://github.com/user-attachments/assets/47aaa3d3-13cb-46c7-802d-e22b471afc80" /> <img width="113" alt="favicon2" src="https://github.com/user-attachments/assets/8e392a33-94b3-40b2-9f26-4186e3fae7e6" /> Hard Refresh https://github.com/user-attachments/assets/f0959dca-7ae9-4f7d-bd0a-12e09786a9ac --------- Co-authored-by: Xinyuan Lin <[email protected]>
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
### **Purpose:** This PR migrates the configuration storage of UI elements, starting with logos, from static files to the database while preserving the existing logo‐customization feature. Future updates will extend this approach to additional elements. ### **Design Proposal:** Design apache#3528 **Related PRs:** apache#3453 - Logos customization UI (default values were defined in separate files and loaded directly; the database only stored updated logos) apache#3480 - site_settings table schema apache#3489 - Updated logos customization UI ### **Changes (updated):** - gui/../admin/settings/admin-setting.component.ts/html/scss: add the “Branding” card for logo upload/reset. - gui/..component/dashboard.component.ts: integrate dynamic logo rendering. - gui/../service/admin/settings/admin-settings.service.ts:CRUD API for settings - config-service/../ConfigService.scala: database connection and defaults preload on startup - amber/../dashboard/admin/settings/AdminSettingsResource.scala: REST endpoints for config CRUD ### **Changes (new)** - config/../resource/default.conf: defined logo defaults (and placeholders for future settings) and added config-service section with **always-reset-configurations-to-default-values** = false flag to control database reset behavior - config/../scala/DefaultsConfig.scala: loads defaults from default.conf ### **Demonstration:** The settings page retains its familiar upload interface, now organized under a Branding card: <img width="1555" alt="admin_setting" src="https://github.com/user-attachments/assets/60264dab-356a-413f-8f05-9a2fd1c8c541" /> --------- Co-authored-by: Xinyuan Lin <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose:
Changes
Demonstration
Default logo, mini logo, and favicon.



Admin update in Settings

Dashboard after Save



Hard Refresh
https://github.com/user-attachments/assets/f0959dca-7ae9-4f7d-bd0a-12e09786a9ac