Add Application Page Header for Visualize Pages#7712
Add Application Page Header for Visualize Pages#7712LDrago27 merged 4 commits intoopensearch-project:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7712 +/- ##
==========================================
- Coverage 63.82% 63.80% -0.03%
==========================================
Files 3653 3655 +2
Lines 81038 81157 +119
Branches 12903 12933 +30
==========================================
+ Hits 51726 51784 +58
- Misses 26138 26194 +56
- Partials 3174 3179 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
47646b4 to
87c2fcb
Compare
Signed-off-by: Suchit Sahoo <suchsah@amazon.com>
Signed-off-by: Suchit Sahoo <suchsah@amazon.com>
virajsanghvi
left a comment
There was a problem hiding this comment.
May want to address Miki's feedback + patch coverage, but otherwise lgtm
95c9f8c to
f0e2d66
Compare
f0e2d66 to
ac27eca
Compare
ac27eca to
79ff126
Compare
Signed-off-by: Suchit Sahoo <suchsah@amazon.com>
79ff126 to
b0252ad
Compare
| : i18n.translate('visBuilder.topNavMenu.saveVisualizationButtonLabel', { | ||
| defaultMessage: 'save', | ||
| }), | ||
| ariaLabel: i18n.translate('visBuilder.topNavMenu.saveVisualizationAsButtonLabel', { |
There was a problem hiding this comment.
Check with UX but I feel when disabled, the aria-label might want to show the reason too.
There was a problem hiding this comment.
Sure will check with UX Regarding this.
| import { AppMountParameters } from 'opensearch-dashboards/public'; | ||
| import { syncQueryStateWithUrl } from '../../../data/public'; | ||
| import { useOpenSearchDashboards } from '../../../opensearch_dashboards_react/public'; | ||
| import { HeaderVariant } from '../../../../core/public/index'; |
There was a problem hiding this comment.
Nope I will clean it up.
| useEffect(() => { | ||
| if (showActionsInGroup) setHeaderVariant?.(HeaderVariant.APPLICATION); | ||
|
|
||
| return () => { | ||
| setHeaderVariant?.(); | ||
| }; |
There was a problem hiding this comment.
If you are doing this on most of the pages, you can actually set the default header while registering the app to use APPLICATION and then set the variant to page on the page that needs it.
There was a problem hiding this comment.
I tried the method you suggested, there are some issues arising during navigations i.e when I change across the listing page and the individual editor pages.
| onSavedQueryIdChange={stateContainer.transitions.updateSavedQuery} | ||
| indexPatterns={indexPatterns} | ||
| screenTitle={vis.title} | ||
| screenTitle={vis.title.length ?? '' ? vis.title : 'New visualization'} |
There was a problem hiding this comment.
Why not just
| screenTitle={vis.title.length ?? '' ? vis.title : 'New visualization'} | |
| screenTitle={vis.title || 'New visualization'} |
* Add Application Header for Visualize Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Fix Application Header Layout for Discover Signed-off-by: Suchit Sahoo <suchsah@amazon.com> * Changeset file for PR #7712 created/updated * Add new Page Header in Vis Builder Signed-off-by: Suchit Sahoo <suchsah@amazon.com> --------- Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit b3234dd) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add Application Header for Visualize * Fix Application Header Layout for Discover * Changeset file for PR #7712 created/updated * Add new Page Header in Vis Builder --------- (cherry picked from commit b3234dd) Signed-off-by: Suchit Sahoo <suchsah@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
This changes at resolving following issues.
Issues Resolved
Screenshot
Visualize with newHomePage flag is done

Discover when newHomePage and queryEnhancement flag is true

Visualize landing page

Dashboards Landing page

Vis Builder Page

Testing the changes
Application header in Visualize
Application Header layout in Discover
Changelog
Check List
yarn test:jestyarn test:jest_integration