-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Dashboard Usability] Unified dashboard settings #153862
Conversation
…pts' into unified-dashboard-opts
Pinging @elastic/kibana-presentation (Team:Presentation) |
} = this.getReduxEmbeddableTools(); | ||
|
||
// TODO Move this action into DashboardContainer.openOverlay | ||
dispatch(setHasOverlays(true)); |
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.
This will disable the Quick save button while the flyout is open. We could move this into DashboardContainer.openOverlay
, but we would need to confirm that other flyouts should disable the save button.
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.
This looks great and is a huge step forward in usability. Great looking functional tests as well.
@@ -363,7 +363,7 @@ Apply a set of design options to the entire dashboard. | |||
|
|||
. If you're in view mode, click *Edit* in the toolbar. | |||
|
|||
. In the toolbar, *Options*, then use the following options: | |||
. In the toolbar, click *Settings*, to open the *Dashboard settings* flyout, then use the following options: |
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.
Something for a follow up PR - rewrite "Apply design options" section into something more appropriate for the new UI, such as "Dashboard settings". Then expand to include all dashboard options
description: i18n.translate('dashboard.topNave.optionsConfigDescription', { | ||
defaultMessage: 'Options', | ||
description: i18n.translate('dashboard.topNave.settingsConfigDescription', { | ||
defaultMessage: 'Change settings for your dashboard', |
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.
How about "Open dashboard settings"
settings: { | ||
...topNavStrings.settings, | ||
id: 'settings', | ||
testId: 'dashboardSettingsButton', | ||
disableButton: isSaveInProgress, |
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.
Should "Settings" button be disabled when the Settings flyout is open? Clicking button again cause flyout to animate open again.
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.
Good idea. I think all the nav bar items should be disabled while the flyout is open since the flyout contains local state that could be lost by clicking "Share", "Save as", or "Switch to view mode".
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton |
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.
Can you add some loading state to the "Apply" button. For example, throttle network connection and click "Apply". Notice how the button does not show any loading state and is still click able while duplicate title check is occuring.
setIsTitleDuplicateConfirmed(true); | ||
}; | ||
|
||
const onApply = async () => { |
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.
Thanks for adding loading state. You will also need to ensure component is still mounted after async task finishes. Otherwise you get errors like this if the component is unmounted before async task finishes
Here is a code example of how to set up isMounted in a functional component with hooks. Thanks @ThomThomson
const [isMounted, setIsMounted] = useState(true);
useEffect(() => {
return () => setIsMounted(false);
});
onTitleDuplicate, | ||
isTitleDuplicateConfirmed, | ||
}); | ||
setIsApplying(false); |
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.
Move setIsApplying after is mounted check.
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.
LGTM
code review, tested in chrome
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
LGTM tested locally and thanks for updating the FTs 👍🏻
## Summary Adds the docs for the following 8.8 Presentation docs: - Unified dashboard settings: #153862 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings - Add reset button: #154872 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard --------- Co-authored-by: Nick Peihl <[email protected]> Co-authored-by: Hannah Mudge <[email protected]>
## Summary Adds the docs for the following 8.8 Presentation docs: - Unified dashboard settings: elastic#153862 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings - Add reset button: elastic#154872 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard --------- Co-authored-by: Nick Peihl <[email protected]> Co-authored-by: Hannah Mudge <[email protected]> (cherry picked from commit 0689c63)
# Backport This will backport the following commits from `main` to `8.8`: - [[DOCS] Adds the presentation 8.8 docs (#157765)](#157765) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kaarina Tungseth","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-16T19:21:01Z","message":"[DOCS] Adds the presentation 8.8 docs (#157765)\n\n## Summary\r\n\r\nAdds the docs for the following 8.8 Presentation docs:\r\n\r\n- Unified dashboard settings:\r\nhttps://github.com//pull/153862\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings\r\n\r\n- Add reset button: https://github.com/elastic/kibana/pull/154872\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard\r\n\r\n---------\r\n\r\nCo-authored-by: Nick Peihl <[email protected]>\r\nCo-authored-by: Hannah Mudge <[email protected]>","sha":"0689c638d3b3e4c8a9d00e1c2da2412a257771ce","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","Team:Presentation","release_note:skip","v8.8.0","v8.9.0"],"number":157765,"url":"https://github.com/elastic/kibana/pull/157765","mergeCommit":{"message":"[DOCS] Adds the presentation 8.8 docs (#157765)\n\n## Summary\r\n\r\nAdds the docs for the following 8.8 Presentation docs:\r\n\r\n- Unified dashboard settings:\r\nhttps://github.com//pull/153862\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings\r\n\r\n- Add reset button: https://github.com/elastic/kibana/pull/154872\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard\r\n\r\n---------\r\n\r\nCo-authored-by: Nick Peihl <[email protected]>\r\nCo-authored-by: Hannah Mudge <[email protected]>","sha":"0689c638d3b3e4c8a9d00e1c2da2412a257771ce"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157765","number":157765,"mergeCommit":{"message":"[DOCS] Adds the presentation 8.8 docs (#157765)\n\n## Summary\r\n\r\nAdds the docs for the following 8.8 Presentation docs:\r\n\r\n- Unified dashboard settings:\r\nhttps://github.com//pull/153862\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings\r\n\r\n- Add reset button: https://github.com/elastic/kibana/pull/154872\r\nDocs preview:\r\nhttps://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard\r\n\r\n---------\r\n\r\nCo-authored-by: Nick Peihl <[email protected]>\r\nCo-authored-by: Hannah Mudge <[email protected]>","sha":"0689c638d3b3e4c8a9d00e1c2da2412a257771ce"}}]}] BACKPORT--> Co-authored-by: Kaarina Tungseth <[email protected]>
## Summary Adds the docs for the following 8.8 Presentation docs: - Unified dashboard settings: #153862 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#add-dashboard-settings - Add reset button: #154872 Docs preview: https://kibana_157765.docs-preview.app.elstc.co/guide/en/kibana/master/dashboard.html#reset-the-dashboard --------- Co-authored-by: Nick Peihl <[email protected]> Co-authored-by: Hannah Mudge <[email protected]>
Summary
Adds flyout for changing individual dashboard settings such as title, description, tags, and save time with dashboard. This also moves the existing dashboard options (show panel titles, sync colors, use margins, sync cursor, and sync tooltips) into the flyout.
Fixes #144532
Flaky test runner
Checklist
Delete any items that are not applicable to this PR.
For maintainers