Repository navigation
Add Admin Site Settings Page with Logo and Favicon Customization - #3453
Merged
Merged
Conversation
xuang7
marked this pull request as ready for review
May 30, 2025 22:51
xuang7
marked this pull request as draft
May 31, 2025 00:05
aglinxinyuan
requested changes
May 31, 2025
aglinxinyuan
left a comment
Contributor
There was a problem hiding this comment.
Had offline discussion regarding the design. We don't want to add an empty page without any functionality.
xuang7
marked this pull request as ready for review
June 2, 2025 00:34
aglinxinyuan
requested changes
Jun 2, 2025
aglinxinyuan
left a comment
Contributor
There was a problem hiding this comment.
Design Feedback
- There's no need to preview the current logo separately — it's already visible on every page.
- A two-level page layout is unnecessary; you can display the upload page directly.
- On the upload page, avoid showing the new logo preview twice — it's already displayed next to the Choose File button.
- A third-level layout specifically for the mini logo is not needed. Instead, include two sets of Choose File and Submit buttons, each on its own line.
- The label "mini logo" is incorrect. Please update it to "favicon" in the codebase. On the frontend, display it as:
favicon (mini logo)
aglinxinyuan
requested changes
Jun 4, 2025
aglinxinyuan
left a comment
Contributor
There was a problem hiding this comment.
Looks much better, left mirror comments.
aglinxinyuan
requested changes
Jun 7, 2025
aglinxinyuan
left a comment
Contributor
There was a problem hiding this comment.
Left mirror comments.
aglinxinyuan
approved these changes
Jun 16, 2025
Contributor
|
Please also update texera_ddl.sql. |
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
…che#3453) ### **Purpose:** This PR introduces a General Settings page to the admin dashboard, providing a foundation for flexible, site-wide configuration and branding. It includes backend REST API, Angular frontend service/component, and a supporting SQL migration. The page currently supports global logo and favicon management and lays the groundwork for future features. ### **Note:** Please apply the SQL migration **(core/scripts/sql/updates/08.sql)** to create the **site_settings** table before using this feature. ### **Changes:** **Backend (new):** - AdminSettingsResource.scala: Implements REST endpoints for getting, updating, and deleting site settings. - core/scripts/sql/updates/08.sql: Creates a new site_settings table for storing key-value configuration. **Backend (updated):** - TexeraWebApplication.scala: Registers the new AdminSettingsResource **Frontend (new):** - admin-settings.service.ts: Service for interacting with backend site settings API. - admin-settings.component.ts/.html/.scss/.spec.ts: Angular component, template, and styling for the Admin Settings page, supporting logo upload, preview, and reset. **Frontend (updated):** - dashboard.component.html: Adds link to the new Admin Settings page in the admin menu. - dashboard.component.ts/scss: Loads and applies the global logo - app.module.ts / app-routing.module.ts: Declares/imports the new service/component and routing. ### **Demonstration:** Accessible from the admin menu. <img width="1411" alt="admin_page" src="https://github.com/user-attachments/assets/4b6fc8e9-858a-4ffe-b947-b096f2c87afa" /> Upload both logo and favicon: <img width="1209" alt="logo+favicon" src="https://github.com/user-attachments/assets/4815b46f-1b6b-4881-b595-9e9007cebb49" /> After saving, the site header shows the new logo and favicon: <img width="1396" alt="new_main1" src="https://github.com/user-attachments/assets/d69d8b80-9bc3-4216-88fc-68f58ce27063" /> <img width="41" alt="favicon" src="https://github.com/user-attachments/assets/6069f613-6a24-4e6e-bab9-99bcc54efc07" /> <img width="241" alt="tab icon" src="https://github.com/user-attachments/assets/92cea215-e69d-402e-95cf-89a11bc074d4" /> Upload only one (logo or favicon) and leave the other unchanged <img width="1205" alt="logo-only" src="https://github.com/user-attachments/assets/bc3a5552-0a10-4fe0-8523-e7c78c956001" /> After (The newly uploaded logo takes effect immediately; the favicon remains unchanged): <img width="1403" alt="new_main2" src="https://github.com/user-attachments/assets/8c92ca5d-7ae7-4f63-9fa8-18596f5009d6" /> <img width="41" alt="favicon" src="https://github.com/user-attachments/assets/922f3c82-c771-4bc4-bf46-a64c4cf82098" /> <img width="241" alt="tab icon" src="https://github.com/user-attachments/assets/7f8c23be-d064-4001-bc76-fbc639e74f0a" /> Changes take effect site-wide immediately after update or reset. <img width="1403" alt="user_page" src="https://github.com/user-attachments/assets/ebcef905-c74e-423a-9dea-ffbcf4815941" /> --------- 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
…che#3453) ### **Purpose:** This PR introduces a General Settings page to the admin dashboard, providing a foundation for flexible, site-wide configuration and branding. It includes backend REST API, Angular frontend service/component, and a supporting SQL migration. The page currently supports global logo and favicon management and lays the groundwork for future features. ### **Note:** Please apply the SQL migration **(core/scripts/sql/updates/08.sql)** to create the **site_settings** table before using this feature. ### **Changes:** **Backend (new):** - AdminSettingsResource.scala: Implements REST endpoints for getting, updating, and deleting site settings. - core/scripts/sql/updates/08.sql: Creates a new site_settings table for storing key-value configuration. **Backend (updated):** - TexeraWebApplication.scala: Registers the new AdminSettingsResource **Frontend (new):** - admin-settings.service.ts: Service for interacting with backend site settings API. - admin-settings.component.ts/.html/.scss/.spec.ts: Angular component, template, and styling for the Admin Settings page, supporting logo upload, preview, and reset. **Frontend (updated):** - dashboard.component.html: Adds link to the new Admin Settings page in the admin menu. - dashboard.component.ts/scss: Loads and applies the global logo - app.module.ts / app-routing.module.ts: Declares/imports the new service/component and routing. ### **Demonstration:** Accessible from the admin menu. <img width="1411" alt="admin_page" src="https://github.com/user-attachments/assets/4b6fc8e9-858a-4ffe-b947-b096f2c87afa" /> Upload both logo and favicon: <img width="1209" alt="logo+favicon" src="https://github.com/user-attachments/assets/4815b46f-1b6b-4881-b595-9e9007cebb49" /> After saving, the site header shows the new logo and favicon: <img width="1396" alt="new_main1" src="https://github.com/user-attachments/assets/d69d8b80-9bc3-4216-88fc-68f58ce27063" /> <img width="41" alt="favicon" src="https://github.com/user-attachments/assets/6069f613-6a24-4e6e-bab9-99bcc54efc07" /> <img width="241" alt="tab icon" src="https://github.com/user-attachments/assets/92cea215-e69d-402e-95cf-89a11bc074d4" /> Upload only one (logo or favicon) and leave the other unchanged <img width="1205" alt="logo-only" src="https://github.com/user-attachments/assets/bc3a5552-0a10-4fe0-8523-e7c78c956001" /> After (The newly uploaded logo takes effect immediately; the favicon remains unchanged): <img width="1403" alt="new_main2" src="https://github.com/user-attachments/assets/8c92ca5d-7ae7-4f63-9fa8-18596f5009d6" /> <img width="41" alt="favicon" src="https://github.com/user-attachments/assets/922f3c82-c771-4bc4-bf46-a64c4cf82098" /> <img width="241" alt="tab icon" src="https://github.com/user-attachments/assets/7f8c23be-d064-4001-bc76-fbc639e74f0a" /> Changes take effect site-wide immediately after update or reset. <img width="1403" alt="user_page" src="https://github.com/user-attachments/assets/ebcef905-c74e-423a-9dea-ffbcf4815941" /> --------- 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:
This PR introduces a General Settings page to the admin dashboard, providing a foundation for flexible, site-wide configuration and branding. It includes backend REST API, Angular frontend service/component, and a supporting SQL migration. The page currently supports global logo and favicon management and lays the groundwork for future features.
Note:
Please apply the SQL migration (core/scripts/sql/updates/08.sql) to create the site_settings table before using this feature.
Changes:
Backend (new):
Backend (updated):
Frontend (new):
Frontend (updated):
Demonstration:
Accessible from the admin menu.

Upload both logo and favicon:

After saving, the site header shows the new logo and favicon:



Upload only one (logo or favicon) and leave the other unchanged

After (The newly uploaded logo takes effect immediately; the favicon remains unchanged):



Changes take effect site-wide immediately after update or reset.
