Skip to content
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

Adds hawt config properties to change appearance of the header and sidebar #1356

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

phantomjinx
Copy link
Member

Overview

Since the Hawtio-Online dynamic console plugin has much more limited space, it is necessary to re-organise the UI components. Therefore,

  • Being able to show/hide the header bar. This is no longer strictly necessary as the latest version of the console plugin still makes use of the header bar but figured this option was still useful, hence its inclusion;
  • Being able to hide the brand logo. This is out of place in a sub-component tab of the OCP console and takes up a significant amount of space so essential to hide it;
  • Being able to hide the User dropdown. This is redundant in the OCP console since the user is displayed at the top of the console, the Preferences are integrated in the console and logout action is redundant;
  • Being able to hide the sidebar. The sidebar is wide and unnecessary. The console-plugin provides a toolbar dropdown that is applied to the header bar so much more compact.

Commit Changes

  • Creates 'appearance' property group in hawtconfig with properties that determine whether

    • showHeader: to show/hide the main header bar
    • showBrand: to show/hide the brand logo in the header bar
    • showUserHeader: to show/hide the user header dropdown in the header bar
    • showSideBar: to show/hide the sidebar
  • config-manager.ts

    • Introduction of Appearance type
    • Functions to fetch the value of the properties from a hawt config with the defaults being true if properties are not specified
  • HawtioHeader.tsx / HawtioPage.tsx

    • Make the various components conditional according to the properties

@phantomjinx phantomjinx self-assigned this Feb 14, 2025
Copy link

github-actions bot commented Feb 14, 2025

Test Results

  7 files   -  1    7 suites   - 1   1h 14m 17s ⏱️ + 10m 0s
 67 tests ± 0   65 ✅ ± 0   2 💤 ±0  0 ❌ ±0 
476 runs   - 68  451 ✅  - 65  25 💤  - 3  0 ❌ ±0 

Results for commit d829167. ± Comparison against base commit a9e8ad9.

♻️ This comment has been updated with latest results.

@hawtio-ci
Copy link

hawtio-ci bot commented Feb 14, 2025

Test results

Run attempt: 3275
Detailed summary

NAME TESTS PASSED ✅ SKIPPED 💤 FAILED ❌ ERRORS 🚫 TIME 🕖
test-results-quarkus-node(18)-java(17)-firefox 68 65 3 0 0 640.769
test-results-quarkus-node(20)-java(17)-firefox 68 65 3 0 0 631.947
test-results-quarkus-node(20)-java(21)-firefox 68 65 3 0 0 652.308
test-results-springboot-node(18)-java(17)-firefox 68 64 4 0 0 630.058
test-results-springboot-node(18)-java(21)-firefox 68 64 4 0 0 639.557
test-results-springboot-node(20)-java(17)-firefox 68 64 4 0 0 635.973
test-results-springboot-node(20)-java(21)-firefox 68 64 4 0 0 627.325

@phantomjinx phantomjinx force-pushed the hawt-config-appearance branch from 3b01ce2 to c217ad6 Compare February 14, 2025 16:24
Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

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

Well, as I suggested before, the other way is to provide a HawtioHeadlessPage along with HawtioPage and the downstream app assembers can choose which page to use. I thought that approach was cleaner than introducing an omni option like the appearance to Hawtconfig.

But let's go with the option you proposed.

…debar

 * Creates 'appearance' property group in hawtconfig with properties
   that determine whether
  - showHeader: to show/hide the main header bar
  - showBrand: to show/hide the brand logo in the header bar
  - showUserHeader: to show/hide the user header dropdown in the header bar
  - showSideBar: to show/hide the sidebar

 * config-manager.ts
  * Introduction of Appearance type

 * HawtioHeader.tsx
 * HawtioPage.tsx
  * Make the various components conditional acciroding to the properties
@phantomjinx phantomjinx force-pushed the hawt-config-appearance branch from c217ad6 to d829167 Compare February 17, 2025 14:51
@phantomjinx phantomjinx merged commit 60245b3 into hawtio:main Feb 17, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants