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

[UX] Consolidate menu bars #1586

Merged
merged 12 commits into from
Jun 24, 2022

Conversation

joshuarrrr
Copy link
Member

@joshuarrrr joshuarrrr commented May 16, 2022

Description

Add a config option to remove the upper global header and incorporate all items into a single header. While the previous expanded dual header is still the default, we've added a new home button which also serves as the location of the global loading indicator.

Additional changes:

  • update branding unit tests
  • fix header spacing at smallest breakpoint
  • update branding functional tests

Issues Resolved

Fixes #1583

Check List

  • New functionality includes testing.
    • All tests pass
      • yarn test:jest
      • yarn test:jest_integration
      • yarn test:ftr
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

@joshuarrrr joshuarrrr requested a review from a team as a code owner May 16, 2022 23:31
@joshuarrrr joshuarrrr force-pushed the ux/header-simplify branch 4 times, most recently from bb2b765 to d2a2e09 Compare May 17, 2022 17:59
@joshuarrrr
Copy link
Member Author

One issue discovered is that the reporting plugin has hard-coded the popover positioning, so I may need a follow-up PR there to fix that in their repo, and is something to call out for plugin authors in general:
Screen Shot 2022-05-17 at 12 41 15 PM

@kgcreative also pointed out that there's some inconsistency with popover positioning - we may need to revisit the default positioning to ensure consistency (the preference is for the underneath popover):
Screen Shot 2022-05-17 at 12 44 10 PM
Screen Shot 2022-05-17 at 12 44 04 PM

Also, the reporting menu action item doesn't appear in the mobile menu:
Screen Shot 2022-05-17 at 12 46 40 PM

@joshuarrrr
Copy link
Member Author

Functional test failures currently under investigation:

                  └- ✖ fail: management  scripted fields creating and using Painless date scripted fields should see scripted field value in Discover
                 │      Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, tr.osdDocTable__row:nth-child(1))
                 │ Wait timed out after 10009ms
                 │     at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/node_modules/selenium-webdriver/lib/webdriver.js:842:17
                 │     at runMicrotasks (<anonymous>)
                 │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
                 │       at onFailure (test/common/services/retry/retry_for_success.ts:39:9)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:79:13)
                 │       at Retry.try (test/common/services/retry/retry.ts:54:14)
                 │       at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:482:9)
                 │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │ 
                 │ 
               └-> should sort scripted field value in Discover
               └-> should filter by scripted field value in Discover
                 └-> "before each" hook: global before each
                 └- ✖ fail: management  scripted fields creating and using Painless date scripted fields should filter by scripted field value in Discover
                 │      Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="plus-painDate-1442531297065"])
                 │ Wait timed out after 10010ms
                 │     at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/node_modules/selenium-webdriver/lib/webdriver.js:842:17
                 │     at runMicrotasks (<anonymous>)
                 │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
                 │       at onFailure (test/common/services/retry/retry_for_success.ts:39:9)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:79:13)
                 │       at Retry.try (test/common/services/retry/retry.ts:54:14)
                 │       at Proxy.clickByCssSelector (test/functional/services/common/find.ts:441:7)
                 │       at TestSubjects.click (test/functional/services/common/test_subjects.ts:127:7)
                 │       at DiscoverPage.clickFieldListPlusFilter (test/functional/page_objects/discover_page.ts:332:7)
                 │       at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:513:9)
                 │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │ 
                 │ 
               └-> should visualize scripted field in vertical bar chart
                 └-> "before each" hook: global before each
                 │ proc [opensearch-dashboards]   log   [00:08:48.625] [error][data][opensearch] [search_phase_execution_exception]: all shards failed
                 │ERROR browser[SEVERE] http://localhost:6610/internal/search/opensearch - Failed to load resource: the server responded with a status of 400 (Bad Request)
                 └- ✖ fail: management  scripted fields creating and using Painless date scripted fields should visualize scripted field in vertical bar chart
                 │      retry.try timeout: Error: retry.tryForTime timeout: Error: Button not found
                 │     at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:418:17
                 │     at runMicrotasks (<anonymous>)
                 │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
                 │     at runAttempt (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:49:15)
                 │     at retryForSuccess (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:88:21)
                 │     at Retry.tryForTime (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry.ts:45:14)
                 │     at Proxy.byButtonText (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:407:14)
                 │     at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:431:24
                 │     at runAttempt (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:49:15)
                 │     at retryForSuccess (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:88:21)
                 │     at Retry.try (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry.ts:54:14)
                 │     at Proxy.clickByButtonText (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:430:7)
                 │     at Inspector.setTablePageSize (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/inspector.ts:115:7)
                 │     at Context.<anonymous> (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/apps/management/_scripted_fields.js:532:11)
                 │     at Object.apply (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │     at onFailure (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:39:9)
                 │     at retryForSuccess (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:79:13)
                 │     at Retry.tryForTime (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry.ts:45:14)
                 │     at Proxy.byButtonText (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:407:14)
                 │     at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:431:24
                 │     at runAttempt (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:49:15)
                 │     at retryForSuccess (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry_for_success.ts:88:21)
                 │     at Retry.try (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/common/services/retry/retry.ts:54:14)
                 │     at Proxy.clickByButtonText (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:430:7)
                 │     at Inspector.setTablePageSize (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/inspector.ts:115:7)
                 │     at Context.<anonymous> (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/apps/management/_scripted_fields.js:532:11)
                 │     at Object.apply (/home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │   Error: retry.try timeout: Error: retry.tryForTime timeout: Error: Button not found
                 │       at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:418:17
                 │       at runMicrotasks (<anonymous>)
                 │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
                 │       at runAttempt (test/common/services/retry/retry_for_success.ts:49:15)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:88:21)
                 │       at Retry.tryForTime (test/common/services/retry/retry.ts:45:14)
                 │       at Proxy.byButtonText (test/functional/services/common/find.ts:407:14)
                 │       at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:431:24
                 │       at runAttempt (test/common/services/retry/retry_for_success.ts:49:15)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:88:21)
                 │       at Retry.try (test/common/services/retry/retry.ts:54:14)
                 │       at Proxy.clickByButtonText (test/functional/services/common/find.ts:430:7)
                 │       at Inspector.setTablePageSize (test/functional/services/inspector.ts:115:7)
                 │       at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:532:11)
                 │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │       at onFailure (test/common/services/retry/retry_for_success.ts:39:9)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:79:13)
                 │       at Retry.tryForTime (test/common/services/retry/retry.ts:45:14)
                 │       at Proxy.byButtonText (test/functional/services/common/find.ts:407:14)
                 │       at /home/runner/work/OpenSearch-Dashboards/OpenSearch-Dashboards/test/functional/services/common/find.ts:431:24
                 │       at runAttempt (test/common/services/retry/retry_for_success.ts:49:15)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:88:21)
                 │       at Retry.try (test/common/services/retry/retry.ts:54:14)
                 │       at Proxy.clickByButtonText (test/functional/services/common/find.ts:430:7)
                 │       at Inspector.setTablePageSize (test/functional/services/inspector.ts:115:7)
                 │       at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:532:11)
                 │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │       at onFailure (test/common/services/retry/retry_for_success.ts:39:9)
                 │       at retryForSuccess (test/common/services/retry/retry_for_success.ts:79:13)
                 │       at Retry.try (test/common/services/retry/retry.ts:54:14)
                 │       at Proxy.clickByButtonText (test/functional/services/common/find.ts:430:7)
                 │       at Inspector.setTablePageSize (test/functional/services/inspector.ts:115:7)
                 │       at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:532:11)
                 │       at Object.apply (packages/osd-test/src/functional_test_runner/lib/mocha/wrap_function.js:95:16)
                 │ 
                 │ 

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2022

Codecov Report

Merging #1586 (a8d9e71) into main (8b7ed4c) will decrease coverage by 0.01%.
The diff coverage is 59.75%.

@@            Coverage Diff             @@
##             main    #1586      +/-   ##
==========================================
- Coverage   67.51%   67.50%   -0.02%     
==========================================
  Files        3073     3074       +1     
  Lines       59069    59127      +58     
  Branches     8963     8988      +25     
==========================================
+ Hits        39881    39911      +30     
- Misses      17005    17031      +26     
- Partials     2183     2185       +2     
Impacted Files Coverage Δ
src/core/public/chrome/chrome_service.tsx 91.66% <ø> (ø)
...c/core/public/chrome/ui/header/collapsible_nav.tsx 94.54% <ø> (+7.87%) ⬆️
src/core/server/opensearch_dashboards_config.ts 100.00% <ø> (ø)
src/legacy/server/config/schema.js 100.00% <ø> (ø)
src/core/public/chrome/ui/header/home_loader.tsx 17.14% <17.14%> (ø)
src/core/public/core_system.ts 91.56% <40.00%> (-0.94%) ⬇️
src/core/server/rendering/rendering_service.tsx 66.23% <50.00%> (-0.88%) ⬇️
...public/chrome/nav_controls/nav_controls_service.ts 95.65% <100.00%> (+15.65%) ⬆️
src/core/public/chrome/ui/header/header.tsx 73.33% <100.00%> (+1.90%) ⬆️
src/core/public/chrome/ui/header/header_logo.tsx 34.09% <100.00%> (+24.71%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b7ed4c...a8d9e71. Read the comment docs.

@joshuarrrr joshuarrrr changed the base branch from main to 2.x May 19, 2022 01:17
@joshuarrrr joshuarrrr changed the base branch from 2.x to main May 19, 2022 01:18
Copy link
Contributor

@tmarkley tmarkley left a comment

Choose a reason for hiding this comment

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

Dockerfile Outdated Show resolved Hide resolved
@@ -221,15 +221,37 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visEditor.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visEditor.clickGo();
const labels = await PageObjects.visChart.getYAxisLabels();
const expectedLabels = ['0', '2,000', '4,000', '6,000', '8,000', '10,000'];
const expectedLabels = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Did these change because of the additional space?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, just enough vertical room at whatever display height the functional tests run at to allow for the extra ticks.

@kavilla
Copy link
Member

kavilla commented May 19, 2022

Did we want to convert this to draft since it's not targeting 2.0? Or close it since it's being reworked?

@joshuarrrr
Copy link
Member Author

Looks pretty good! Can we delete this file as well now? https://github.com/tmarkley/OpenSearch-Dashboards/blob/c74c1f57d119f63462fdbd3fde5986957bc8a79a/src/core/server/core_app/assets/default_branding/opensearch_logo.svg

Although we're not currently using it anywhere, I don't think there's a need to remove it from the repo altogether; my understanding is that @kgcreative may decide to use it elsewhere (possibly on the loading or welcome screens).

Copy link
Member Author

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

Still needs additional tests, but this is ready for initial review.

Comment on lines -220 to -253
{/* Pinned items */}
<EuiFlexItem grow={false} style={{ flexShrink: 0 }}>
<EuiCollapsibleNavGroup
background="light"
className="eui-yScroll"
style={{ maxHeight: '40vh' }}
>
<EuiListGroup
aria-label={i18n.translate('core.ui.primaryNav.pinnedLinksAriaLabel', {
defaultMessage: 'Pinned links',
})}
listItems={[
{
label: 'Home',
iconType: 'home',
href: homeHref,
onClick: (event) => {
if (isModifiedOrPrevented(event)) {
return;
}

event.preventDefault();
closeNav();
navigateToApp('home');
},
},
]}
maxWidth="none"
color="text"
gutterSize="none"
size="s"
/>
</EuiCollapsibleNavGroup>
</EuiFlexItem>
Copy link
Member Author

Choose a reason for hiding this comment

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

Removing home link from the collapsible menu.

src/core/public/chrome/ui/header/header.scss Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/header.tsx Outdated Show resolved Hide resolved
/>
{useExpandedMenu && (
<EuiHeader
theme="dark"
Copy link
Member Author

Choose a reason for hiding this comment

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

It's a bit weird that we kind of misuse the theme to hard-code this expanded menu as dark, but there's no good reason to change, especially now that it won't be enabled by default.

Comment on lines 132 to 155
...(observables.navControlsExpandedCenter$ && {
items: [
<EuiShowFor sizes={['m', 'l', 'xl']}>
<HeaderNavControls navControls$={observables.navControlsExpandedCenter$} />
</EuiShowFor>,
],
}),
borders: 'none',
},
{
...((observables.navControlsExpandedCenter$ ||
observables.navControlsExpandedRight$) && {
items: [
<EuiHideFor sizes={['m', 'l', 'xl']}>
<HeaderNavControls navControls$={observables.navControlsExpandedCenter$} />
</EuiHideFor>,
<HeaderNavControls navControls$={observables.navControlsExpandedRight$} />,
],
}),
borders: 'none',
},
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be a breaking change for Bitergia - they'll need to update their menu plugin to uses these new navControls locations. But because we're going to the simplified menu by default, I think that's the best migration path (and better than trying to find some conditional solution) - any other plugins using the existing navControls locations won't need to do anything.

Comment on lines 30 to 36
const getIconProps = () => {
const iconType = customMark
? customMark
: useExpandedMenu
? 'home'
: `${assetFolderUrl}/${defaultMark}`;
const testSubj = customMark ? 'customLogo' : useExpandedMenu ? 'homeLogo' : 'defaultLogo';
Copy link
Member Author

Choose a reason for hiding this comment

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

I generally don't like nested ternaries, but I didn't particularly like the other options here either. Essentially, we'll always use a custom mark if provided; otherwise we'll use the OSD logo in the default mode or a home icon in the expanded mode.

Open to suggestions!

src/core/public/chrome/ui/header/home_icon.tsx Outdated Show resolved Hide resolved
Comment on lines +37 to +39
.headerIsExpanded & {
min-height: calc(100vh - #{$euiHeaderHeightCompensation * 2});
}
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems wrong to need to have this calculation done imperatively at the plugin level. But we don't have access to variables defined in the core, such as $osdHeaderOffset. I explored the idea of using root CSS variables that are reset, instead of toggling the body class, but this seemed like the safest and least invasive approach. 😧

test/functional/apps/visualize/_custom_branding.ts Outdated Show resolved Hide resolved
@joshuarrrr joshuarrrr marked this pull request as ready for review June 15, 2022 02:52
@kavilla
Copy link
Member

kavilla commented Jun 16, 2022

Looking cool!

However, even though I believe this is by design, the top logo not being clickable in the expanded view feels a little weird especially if existing UX would do that.

@kgcreative
Copy link
Member

However, even though I believe this is by design, the top logo not being clickable in the expanded view feels a little weird especially if existing UX would do that.

We should make the top logo clickable, even if we do have the bottom bar also go "home".

@joshuarrrr
Copy link
Member Author

We should make the top logo clickable, even if we do have the bottom bar also go "home".

Done.

kavilla
kavilla previously approved these changes Jun 23, 2022
@kavilla
Copy link
Member

kavilla commented Jun 23, 2022

LGTM! In the doc issue we can add more details about the plan switch over? Like we plan to consolidate by default for 3.0 correct? if that's the case then can create a follow-up issue as well to switch this to default false on main but we can keep the logic and then remove the logic in 4.0?

ashwin-pc
ashwin-pc previously approved these changes Jun 23, 2022
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few nit's that can either be addressed in a future PR or just something to look out for in future.

src/core/public/chrome/ui/header/header.scss Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/header_logo.test.tsx Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/home_icon.tsx Outdated Show resolved Hide resolved
- update branding mark unit tests
- fix header spacing at smallest breakpoint
- update custom branding functional test
- update line chart functional test ticks to account for more
ticks visisble with larger height of viz area
- update release notes

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- add branding config for expanded menu

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- revert release note addition

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- remove home link from collapsible nav

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- Add expanded header option
- Move navControlsRight to left of help
- Rename HeaderLogo to HomeLoader
  - Serves as unified home button and global loading     indicator
  - Add title for tooltip, because purpose may not be obvious
- Rename Mark to HomeIcon
  - Uses home icon when header expanded by default
- Restore HeaderLogo for expanded header
  - Duplicate default logo, rename to match mark naming (default, dark)
- Add new nav control areas for expanded menu only
  - navControlsExpandedRight
  - navControlsExpandedCenter
- Add new body class for expanded header
  - used by styles to correctly set app height
  - remove unecessary duplicate header mixin inclusion

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- fix functional tests
  - update test subjects
  - convert home tests to ts
  - update names and methods to be more clear

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- update snapshots

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- add, update, improve unit tests

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- keep expanded as default config

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- restore logo link
- update functional tests

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- group dark mode branding tests

Signed-off-by: Josh Romero <rmerqg@amazon.com>
- final review updates

Signed-off-by: Josh Romero <rmerqg@amazon.com>
@joshuarrrr
Copy link
Member Author

joshuarrrr commented Jun 23, 2022

I'll squash the commit message when merging:

[UX] Consolidate menu bars

- Add expanded header option to branding config
- Move navControlsRight to left of help
- Add HomeLoader
  - Serves as unified home button and global loading indicator
  - Add title for tooltip, because purpose may not be obvious
- Rename Mark to HomeIcon
  - Uses home icon when header expanded by default
  - Update unit tests
- Remove loading indicator from top header
  - Duplicate default logo, rename to match mark naming (default, dark)
- Add new nav control areas for expanded menu only
  - navControlsExpandedRight
  - navControlsExpandedCenter
- Add new body class for expanded header
  - used by styles to correctly set app height
  - remove unnecessary duplicate header mixin inclusion
- Fix header spacing at smallest breakpoint
- Update functional tests
  - update test subjects
  - convert home tests to ts
  - update names and methods to be more clear
- Remove home link from collapsible nav

Fixes https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1583

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

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

LGTM!

@kavilla kavilla merged commit ae6cb80 into opensearch-project:main Jun 24, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 24, 2022
Add a config option to remove the upper global header and incorporate all items into a single header. While the previous expanded dual header is still the default, we've added a new home button which also serves as the location of the global loading indicator.

Additional changes:

* update branding unit tests
* fix header spacing at smallest breakpoint
* update branding functional tests

Issue resolved:
#1583

Squashed commits:
- update branding mark unit tests
- fix header spacing at smallest breakpoint
- update custom branding functional test
- update line chart functional test ticks to account for more
ticks visisble with larger height of viz area
- update release notes
- add branding config for expanded menu
- revert release note addition
- remove home link from collapsible nav
- Add expanded header option
- Move navControlsRight to left of help
- Rename HeaderLogo to HomeLoader
  - Serves as unified home button and global loading     indicator
  - Add title for tooltip, because purpose may not be obvious
- Rename Mark to HomeIcon
  - Uses home icon when header expanded by default
- Restore HeaderLogo for expanded header
  - Duplicate default logo, rename to match mark naming (default, dark)
- Add new nav control areas for expanded menu only
  - navControlsExpandedRight
  - navControlsExpandedCenter
- Add new body class for expanded header
  - used by styles to correctly set app height
  - remove unecessary duplicate header mixin inclusion
- fix functional tests
  - update test subjects
  - convert home tests to ts
  - update names and methods to be more clear
- update snapshots
- add, update, improve unit tests
- keep expanded as default config
- restore logo link
- update functional tests
- group dark mode branding tests
- final review updates

Signed-off-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit ae6cb80)
kavilla pushed a commit that referenced this pull request Jun 24, 2022
Add a config option to remove the upper global header and incorporate all items into a single header. While the previous expanded dual header is still the default, we've added a new home button which also serves as the location of the global loading indicator.

Additional changes:

* update branding unit tests
* fix header spacing at smallest breakpoint
* update branding functional tests

Issue resolved:
#1583

Squashed commits:
- update branding mark unit tests
- fix header spacing at smallest breakpoint
- update custom branding functional test
- update line chart functional test ticks to account for more
ticks visisble with larger height of viz area
- update release notes
- add branding config for expanded menu
- revert release note addition
- remove home link from collapsible nav
- Add expanded header option
- Move navControlsRight to left of help
- Rename HeaderLogo to HomeLoader
  - Serves as unified home button and global loading     indicator
  - Add title for tooltip, because purpose may not be obvious
- Rename Mark to HomeIcon
  - Uses home icon when header expanded by default
- Restore HeaderLogo for expanded header
  - Duplicate default logo, rename to match mark naming (default, dark)
- Add new nav control areas for expanded menu only
  - navControlsExpandedRight
  - navControlsExpandedCenter
- Add new body class for expanded header
  - used by styles to correctly set app height
  - remove unecessary duplicate header mixin inclusion
- fix functional tests
  - update test subjects
  - convert home tests to ts
  - update names and methods to be more clear
- update snapshots
- add, update, improve unit tests
- keep expanded as default config
- restore logo link
- update functional tests
- group dark mode branding tests
- final review updates

Signed-off-by: Josh Romero <rmerqg@amazon.com>
(cherry picked from commit ae6cb80)

Co-authored-by: Josh Romero <rmerqg@amazon.com>
@joshuarrrr joshuarrrr deleted the ux/header-simplify branch June 24, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UX] Redesigned Global Header
6 participants