-
Notifications
You must be signed in to change notification settings - Fork 916
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
Add Application Page Header for Visualize Pages #7712
Add Application Page Header for Visualize Pages #7712
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 <[email protected]>
Signed-off-by: Suchit Sahoo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
79ff126
to
b0252ad
Compare
: i18n.translate('visBuilder.topNavMenu.saveVisualizationButtonLabel', { | ||
defaultMessage: 'save', | ||
}), | ||
ariaLabel: i18n.translate('visBuilder.topNavMenu.saveVisualizationAsButtonLabel', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will check with UX Regarding this.
@@ -35,6 +35,7 @@ import { Route, Switch, useLocation } from 'react-router-dom'; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope I will clean it up.
useEffect(() => { | ||
if (showActionsInGroup) setHeaderVariant?.(HeaderVariant.APPLICATION); | ||
|
||
return () => { | ||
setHeaderVariant?.(); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -216,14 +259,15 @@ const TopNav = ({ | |||
savedQueryId={currentAppState.savedQuery} | |||
onSavedQueryIdChange={stateContainer.transitions.updateSavedQuery} | |||
indexPatterns={indexPatterns} | |||
screenTitle={vis.title} | |||
screenTitle={vis.title.length ?? '' ? vis.title : 'New visualization'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just
screenTitle={vis.title.length ?? '' ? vis.title : 'New visualization'} | |
screenTitle={vis.title || 'New visualization'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update it
* Add Application Header for Visualize Signed-off-by: Suchit Sahoo <[email protected]> * Fix Application Header Layout for Discover Signed-off-by: Suchit Sahoo <[email protected]> * Changeset file for PR #7712 created/updated * Add new Page Header in Vis Builder Signed-off-by: Suchit Sahoo <[email protected]> --------- Signed-off-by: Suchit Sahoo <[email protected]> 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 <[email protected]> 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:jest
yarn test:jest_integration