-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Vis: Default editor] EUIficate gauge/goal options tab #43265
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
[Vis: Default editor] EUIficate gauge/goal options tab #43265
Conversation
💔 Build Failed |
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
…ns/gauge # Conflicts: # src/legacy/core_plugins/kbn_vislib_vis_types/public/controls/select.tsx # src/legacy/ui/public/vis/editors/default/vis_options.js
💔 Build Failed |
|
Pinging @elastic/kibana-app |
💔 Build Failed |
maryia-lapata
left a comment
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 think maybe it makes sense to split each panel into a separate component. It'll allow to keep components smaller and a bit simpler. Also probably we will be able reuse Range panel in Heat map vis
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge.tsx
Outdated
Show resolved
Hide resolved
💔 Build Failed |
|
@maryia-lapata each panel was split. please, take a look |
💔 Build Failed |
maryia-lapata
left a comment
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, testes locally on Chrome, Mac
💔 Build Failed |
💚 Build Succeeded |
cchaos
left a comment
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.
👍
dmlemeshko
left a comment
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.
Functional tests update LGTM. Passed locally on both Chrome/Firefox 👍
dmlemeshko
left a comment
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.
Functional tests update LGTM. Passed locally on both Chrome/Firefox 👍
flash1293
left a comment
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.
Code LGTM
| addLegend: boolean; | ||
| isDisplayWarning: boolean; | ||
| gauge: { | ||
| readonly backStyle: 'Full'; |
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.
Not sure why some of those are set to readonly - could you elaborate?
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.
The readonly params are only need for initial config and won't be changed anywhere.
We decided to mark them as readonly..
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.
As they only have a single allowed value, it shouldn't change anything. Even if you don't have it readonly, you wouldn't be able to do params.type = 'xy';, right?
src/legacy/core_plugins/kbn_vislib_vis_types/public/editors/gauge/style_panel.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| const setGaugeType = useCallback( | ||
| (paramName: 'gaugeType', value: GaugeVisParams['gauge']['gaugeType']) => { | ||
| const minAngle = value === 'Arc' ? undefined : 0; |
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.
Probably out of scope for this PR, but it seems like the angle params don't do anything useful for gauge - could we have this min and max angle as default params in the actual visualization? Then we don't have to handle this here in the form and just pass undefined for all cases.
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.
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.
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.
Exactly, that's what I meant - moving the default values into the actual rendering code so we don't have to care about it in the form.
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 would make sense!
I'll create a PR, maybe someone could verify that this changes would not break a possible configuration issues! (I mean the possibility of creating custom minAngel and maxAngel in the default config or even in a custom plugin )
|
retest |
💚 Build Succeeded |
* Euificate gauge options * Changes params places * Add ranges validation * Get rid of legacy translates * Fix functional tests * Split gauge to panel components * Disable alignment option


Summary
A part of #38273.
EUIfication of the
Optionstab in theGaugeandGoalvisualizations.This includes:
Metrictype of gauge, since this type was removed -> removes left over code from the gauge-metric #15142 ;ng-hide,ng-showandng-ifbecomesenabled/disabledfor edit;Alignmentfield when there is a singleMetricaggregation and absence ofBuckets:Changes are done according to:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers