Skip to content

feat: enable dynamic sidebar tabs customization - #3533

Merged
xuang7 merged 17 commits into
apache:masterfrom
xuang7:master
Jul 18, 2025
Merged

xuang7 merged 17 commits into
apache:masterfrom
xuang7:master

Conversation

@xuang7

@xuang7 xuang7 commented Jul 5, 2025 •

Copy link
Copy Markdown
Contributor

Purpose

This PR extends the new configuration-CRUD framework to sidebar navigation. Admins can now toggle entire groups or individual menu items from Admin → General Settings → Sidebar Tabs based on values retrieved from the database; no service restarts required.

Changes

  • gui/../admin/settings/admin-setting.component.ts/html/scss: Added the "Sidebar Tabs" card for tabs enable/disable/reset
  • gui/..component/dashboard.component.ts/html: Integrated sidebar tab rendering based on values pulled from the database.
  • gui/src/app/hub/component/hub.component.ts/html: Applied new sidebar tab variable sourced from the database.
  • config/../resource/default.conf: Added individual default tab keys and moved Admin out as a top-level group
  • GuiConfig.scala/ConfigResoource.scala/gui.conf/gui-config.service.mock.ts/gui-config.ts: Removed sidebar tab config entries: hubEnabled, projectEnabled, forumEnabled
  • Message Display
    • Tabs Toggle
      • Success: "{Tab Name} tab saved successfully." (e.g., "Hub tab saved successfully.")
      • Error: "Failed to save {Tab Name} tab."
    • Reset Tabs
      • Shows "Resetting tabs..." immediately after clicking the reset button.
      • Shows error for each failed tab: "Failed to reset {Tab Name}."
      • Page reloads after 0.5 second

Demonstration

Setting Page:
setting-page

Before customization:
tabs

After customization (Hub disabled and hidden)
no-hub

@xuang7 xuang7 self-assigned this Jul 5, 2025
@xuang7 xuang7 added the config Pull requests that update configuration label Jul 5, 2025
@xuang7
xuang7 marked this pull request as ready for review July 7, 2025 19:47
@xuang7
xuang7 requested a review from aglinxinyuan July 7, 2025 19:47

@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.

We had another offline discussion, and we will not store metadata of tabs on the backend. We will only store the enabled value.

@xuang7
xuang7 requested a review from aglinxinyuan July 14, 2025 04:46
@xuang7
xuang7 requested a review from aglinxinyuan July 14, 2025 22:13

@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.

Looks good! Please remove the leftover variables related to the old hubEnabled, forumEnabled, and projectEnabled settings from both the frontend and backend. This may include files like core/gui/src/app/common/type/gui-config.ts, core/config/src/main/resources/gui.conf, and potentially other locations.

@xuang7 xuang7 changed the title feat: enable dynamic sidebar-tabs customization feat: enable dynamic sidebar-tabs customization tt Jul 17, 2025
@xuang7 xuang7 changed the title feat: enable dynamic sidebar-tabs customization tt feat: enable dynamic sidebar-tabs customization Jul 17, 2025
@xuang7 xuang7 changed the title feat: enable dynamic sidebar-tabs customization feat: enable dynamic sidebar tabs customization Jul 18, 2025
@xuang7
xuang7 merged commit 275c4c4 into apache:master Jul 18, 2025
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
### **Purpose**
This PR extends the new [configuration-CRUD
framework](apache#3528) to sidebar
navigation. Admins can now toggle entire groups or individual menu items
from Admin → General Settings → Sidebar Tabs based on values retrieved
from the database; no service restarts required.

### **Changes**
- gui/../admin/settings/admin-setting.component.ts/html/scss: Added the
"Sidebar Tabs" card for tabs enable/disable/reset
- gui/..component/dashboard.component.ts/html: Integrated sidebar tab
rendering based on values pulled from the database.
- gui/src/app/hub/component/hub.component.ts/html: Applied new sidebar
tab variable sourced from the database.
- config/../resource/default.conf: Added individual default tab keys and
moved Admin out as a top-level group
-
GuiConfig.scala/ConfigResoource.scala/gui.conf/gui-config.service.mock.ts/gui-config.ts:
Removed sidebar tab config entries: hubEnabled, projectEnabled,
forumEnabled
- **Message Display**
  - Tabs Toggle
- Success: "{Tab Name} tab saved successfully." (e.g., "Hub tab saved
successfully.")
    - Error: "Failed to save {Tab Name} tab."
  - Reset Tabs
- Shows "Resetting tabs..." immediately after clicking the reset button.
    - Shows error for each failed tab: "Failed to reset {Tab Name}."
    - Page reloads after 0.5 second

### **Demonstration**
Setting Page:
<img width="1440" height="905" alt="setting-page"
src="https://github.com/user-attachments/assets/c0b954f3-97e3-46c5-9a42-9e3e97dabccf"
/>

Before customization:
<img width="300" height="484" alt="tabs"
src="https://github.com/user-attachments/assets/bae215cf-3473-45fa-8485-053b9dbad21d"
/>

After customization (Hub disabled and hidden)
<img width="1438" height="912" alt="no-hub"
src="https://github.com/user-attachments/assets/fd2bcab8-d9bc-4e0a-a750-2fdb3c53558d"
/>

---------

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 extends the new [configuration-CRUD
framework](apache#3528) to sidebar
navigation. Admins can now toggle entire groups or individual menu items
from Admin → General Settings → Sidebar Tabs based on values retrieved
from the database; no service restarts required.

### **Changes**
- gui/../admin/settings/admin-setting.component.ts/html/scss: Added the
"Sidebar Tabs" card for tabs enable/disable/reset
- gui/..component/dashboard.component.ts/html: Integrated sidebar tab
rendering based on values pulled from the database.
- gui/src/app/hub/component/hub.component.ts/html: Applied new sidebar
tab variable sourced from the database.
- config/../resource/default.conf: Added individual default tab keys and
moved Admin out as a top-level group
-
GuiConfig.scala/ConfigResoource.scala/gui.conf/gui-config.service.mock.ts/gui-config.ts:
Removed sidebar tab config entries: hubEnabled, projectEnabled,
forumEnabled
- **Message Display**
  - Tabs Toggle
- Success: "{Tab Name} tab saved successfully." (e.g., "Hub tab saved
successfully.")
    - Error: "Failed to save {Tab Name} tab."
  - Reset Tabs
- Shows "Resetting tabs..." immediately after clicking the reset button.
    - Shows error for each failed tab: "Failed to reset {Tab Name}."
    - Page reloads after 0.5 second

### **Demonstration**
Setting Page:
<img width="1440" height="905" alt="setting-page"
src="https://github.com/user-attachments/assets/c0b954f3-97e3-46c5-9a42-9e3e97dabccf"
/>

Before customization:
<img width="300" height="484" alt="tabs"
src="https://github.com/user-attachments/assets/bae215cf-3473-45fa-8485-053b9dbad21d"
/>

After customization (Hub disabled and hidden)
<img width="1438" height="912" alt="no-hub"
src="https://github.com/user-attachments/assets/fd2bcab8-d9bc-4e0a-a750-2fdb3c53558d"
/>

---------

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

config Pull requests that update configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants