Repository navigation
[Controls] Deprecate old controls - #132562
Conversation
5178bc1 to
507fa0b
Compare
64874e0 to
c96f753
Compare
There was a problem hiding this comment.
I removed these tests entirely because they no longer apply now that input controls have been moved to the new deprecated stage from the experimental stage - this was discussed with @stratoula to ensure that this was the right move, since deleting tests is always a bit scary 😆
There was a problem hiding this comment.
Made this chartConfigToken optional because, for the deprecated input controls, there is currently no uiSetting toggle for it nor will there be a new visualization that replaces it - basically, the goal is that the input controls visualization will eventually be removed entirely rather than replaced with a newer version.
So, since the input controls don't have a chartConfigToken, I needed to make this optional so that I could still use the VizChartWarning for the input control warning.
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
ThomThomson
left a comment
There was a problem hiding this comment.
Code only review, all of the presentation team changes LGTM! Hopefully Stratoula can check with the team and get this reviewed on Monday.
All the visuals are looking great!
There was a problem hiding this comment.
We chose to re-name these to help distinguish between the old controls (now input controls) and the new controls (just controls).
03aa016 to
1e5c5e7
Compare
| return ( | ||
| <FormattedMessage | ||
| id="visualizations.controls.notificationMessage" | ||
| defaultMessage="Input controls are deprecated and will be removed in a future release. Use the new Controls to filter and interact with your dashboard data. " |
There was a problem hiding this comment.
Is there any documentation for the new controls to show to the users? This is your call of course but I think, it would be better to have a link to a documentation for the new controls. Where can I find them? etc
There was a problem hiding this comment.
@KOTungseth Do we have a link for the new controls docs yet? If not, I think we could safely add this after feature freeze as well as long as we can get the actual deprecation code in first :)
|
@Heenawter this looks good from the code perspective. I also tested it and looks fine! @flash1293 the presentation team wants to merge it before the FF but the thing we wanted to discuss is the following: The presentation team wants to deprecate the old controls in favor of the new ones. The old controls were on experimental stage and now the team has introduced a new stage ( From my point of view, this is not a big problem. I think that the current PR is fine but I also need your feedback here. I discussed it also with @ghudgins and he also feels the same. The other idea from the presentation team was to introduce a new switch (Enable deprecated visualizations) that it will affect the deprecated vis types but we find it a bit confusing for the following reasons:
With that being said, I vote for merging this PR as it is. Wdyt? |
|
What about having experimental and deprecated as two separate state properties? I don’t want to cause more work than necessary, so if it’s very hard to do I’m fine with the current approach, too - separating experimental and deprecated however feels like the cleanest solution. |
|
I see, this is not a bad idea actually. So the input controls stay on the experimental stage and follows the rules of this flag and is also deprecated. I like it! |
|
I pushed a commit to implement what we are proposing. How do you feel about it? Something that I noticed that is irrelevant with this PR and also reproducable at least on 8.2 is the following. I close the enableLabs setting, go to dashboard. First thing I see the Controls as an option while I shouldn't. When I click it, I see this error. I think that on the Select type menu, you should also check the status of this setting and not display the controls if the setting is off. I can create an issue for that |
|
@stratoula Thanks so much for making the necessary changes! And for finding that bug - I wonder how long that has been around? 😆 Definitely need to fix that @flash1293 I tested it locally, and I really like this change - keeping the old controls as experimental so the existing behaviour doesn't change, but marking them as deprecated so that users know that they will soon be removed. Awesome suggestion! :) |
|
@KOTungseth That technical preview text is used throughout many apps so, if we wanted to change the wording, I think it would be best to do it in a separate PR since it would require many more approvals to keep it consistent. Here's an example of it in Machine Learning: |
|
@Heenawter can we leave the words as-is, but render the text in a different color to differentiate between the regular text and link text? I like the title too, but if we can't mess with the formatting, that's cool :) |
|
@KOTungseth Ahhh gotchya! Yeah, we can do that. So, when the old input controls are not marked as deprecated (since they are currently our only experimental vis to test on): But when they are marked as deprecated: |
3be0083 to
da3a028
Compare
flash1293
left a comment
There was a problem hiding this comment.
LGTM, works as expected.
| </EuiFlexItem> | ||
| <EuiFlexItem> | ||
| <EuiFlexGroup gutterSize="xs" alignItems="center" responsive={false}> | ||
| <EuiFlexGroup gutterSize="s" alignItems="center" responsive={false}> |
There was a problem hiding this comment.
Thanks so much for the review despite the fact that you are off for the day, @flash1293! It's greatly appreciated ❤️
This change was so that the visualization name and the new "Deprecated" tag had a tiny bit more space between them, like so:
💛 Build succeeded, but was flakyFailed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @Heenawter |
* Deprecate old controls * Use badge instead of changing the name * Fix warning message * Add i18n support for deprecated tag * Fix functional and jest tests * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * Add an isDeprecated flag to the visTypes * Fix wording of enable labs setting * Stylize technical preview message Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Closes #130760
Summary
Since the new input controls are now on by default in 8.3, the old controls need to be deprecated so that users know we are moving away from them 🎉
This PR adds a new stage to visualizations -
deprecated, which impacts...the Visualize
commoneditor:the dropdown visualization type menu in Dashboard:
It also works with the
CHARTS_TO_BE_DEPRECATEDarray so that a custom warning can be shown when in the editor:Checklist
For maintainers