Skip to content

Enable Independent Configuration of Dashboard Logos and Fix Logo Loading Behavior - #3489

Merged
xuang7 merged 4 commits into
masterfrom
xuan-fix-logo-loading-behavior
Jun 20, 2025
Merged

xuang7 merged 4 commits into
masterfrom
xuan-fix-logo-loading-behavior

Conversation

@xuang7

@xuang7 xuang7 commented Jun 20, 2025 •

Copy link
Copy Markdown
Contributor

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.
logo1
mini1
favicon1

Admin update in Settings
change

Dashboard after Save
logo2
mini2
favicon2

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

@xuang7 xuang7 added the fix label Jun 20, 2025
@xuang7
xuang7 requested a review from aglinxinyuan June 20, 2025 03:51
@xuang7 xuang7 self-assigned this Jun 20, 2025
@xuang7
xuang7 marked this pull request as ready for review June 20, 2025 04:24
@xuang7 xuang7 changed the title Enable Independent Configuration of Dashboard Logo, Collapsed Icon, and Favicon Enable Independent Configuration of Dashboard Logos and Fix Logo Loading Behavior Jun 20, 2025

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@xuang7
xuang7 merged commit 6f4704a into master Jun 20, 2025
@xuang7
xuang7 deleted the xuan-fix-logo-loading-behavior branch June 20, 2025 05:51
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants