[Presentation Util] Shared toolbar component#94139
Conversation
ce80f02 to
51ae1ae
Compare
45c848b to
847f278
Compare
c0c85a7 to
c80a919
Compare
4e8fd95 to
dc91fa6
Compare
Fixed ts errors
Fixed tsconfig
Fixed quick button background color
Suggestions for more generic component; named slots projection
Refactor toolbar in dashboard
Fixed i18n ids
Added button size to QuickButtonGroup
Fixed add panel test subject
Exported all sub components from solution toolbar
Fixed library button data test subject
Fixed style lint errors
Spread remaining props on add from library button component
Fixed prop type
Added functional tests for dashboard quick buttons
Use page object instead of test subject
Fixed functional tests
Renamed files
Fixed toolbar components
dc91fa6 to
68613cf
Compare
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
jbudz
left a comment
There was a problem hiding this comment.
operations - limits.yml LGTM
There was a problem hiding this comment.
The code looks super modular and well done!
Also tested in Chrome, and the shortcut buttons work really well and everything mostly seems to be working as expected.
One thing I did notice is that the unsaved changes badge appears if you navigate to an editor, then return to the dashboard with the back button or the cancel button. There shouldn't any unsaved changes in this state.
I'm not sure if this is in Master or not - but I checked and it works correctly in 7.12.
Edit turns out that I can reproduce this issue on master as well. I will investigate!
Edit 2 It turns out that this only happens when you have a map panel on a dashboard, I have created an issue
poffdeluxe
left a comment
There was a problem hiding this comment.
Looks great! One small question but otherwise looks good
|
|
||
| // required for dynamic import using React.lazy() | ||
| // eslint-disable-next-line import/no-default-export | ||
| export default PrimaryActionPopover; |
There was a problem hiding this comment.
A lot of these have the export default but are we using the React.lazy for these components? Do we still want to export them like this?
There was a problem hiding this comment.
Ah right, that's leftover from when I was trying to lazy load the components, but then Clint helped me realize that we probably shouldn't lazy load the toolbar. I'll remove the default export from all the solution toolbar components.
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Left one small SCSS comment below, but looks good otherwise. Approving so I don't hold you up.
| @@ -0,0 +1,8 @@ | |||
| .quickButtonGroup { | |||
| .euiButtonGroup__buttons { | |||
There was a problem hiding this comment.
Would it be possible to create/use a different class to avoid using EUI classes? Thanks!
There was a problem hiding this comment.
Actually, on second look, it appears that the related border-radius style might not even be necessary, as EUI is already giving it this styling. If I'm not mistaken, I think this selector and style can be removed altogether.
|
@elasticmachine merge upstream |
|
user doesn't have permission to update head repository |
| return null; | ||
| } | ||
|
|
||
| if (this.props.newVisType) { |
There was a problem hiding this comment.
I am so sorry but I dont get what we want to do. What kind of information has the newVisType prop. And why do we return null if it has a value? If we don't want to display the wizard, why do we use this component? 🤔
There was a problem hiding this comment.
So it turns out I didn't actually need to go through the new vis modal to add these visualizations, and instead use the embeddable state transfer service. I removed all the changes to the new vis modal.
| query?: Query; | ||
| filters?: Filter[]; | ||
| timeRange?: TimeRange; | ||
| newVisType?: string; |
There was a problem hiding this comment.
You can also remove this, right?
There was a problem hiding this comment.
Yep! Sorry I missed this line.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Related to #85666.
This moves the solution toolbar from the
dashboardplugin into thepresentation_utilplugin and adds quick buttons to the toolbar in Dashboard.Significant changes:
panelToolbarintopresentationUtilplugin and renamed tosolutionToolbarMarkdownandInput controlswere added to Dashboard toolbarpresentationUtilplugin bundle size limit was increased because we added new toolbar components. The toolbar should be one of the first visible parts of the UI in Dashboard, so it shouldn't be lazy loaded.Checklist
Delete any items that are not applicable to this PR.
For maintainers