Skip to content
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

[Time to Visualize] Enable by Default #88390

Merged

Conversation

ThomThomson
Copy link
Contributor

@ThomThomson ThomThomson commented Jan 14, 2021

Summary

A major piece of #51318
Closes #52682

Release Notes: Enable "by value embeddables" (dashboard.allowByValueEmbeddables) by default

All progress on the Time to Visualize project has been hidden behind the flag dashboard.allowByValueEmbeddables. This PR changes the default value of that config option to true.

Documentation will be added in a followup.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@ThomThomson ThomThomson added Feature:Dashboard Dashboard related features release_note:roadmap Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Project:TimeToVisualize v7.12.0 labels Jan 14, 2021
@ThomThomson ThomThomson changed the title Flip the switch to see functional test failures [Time to Visualize] Enable by Default Jan 14, 2021
@ThomThomson ThomThomson force-pushed the feature/timeToVisualizeRibbonCut branch 2 times, most recently from b2e353e to 9b596a1 Compare January 15, 2021 03:04
…ptions to lens page. Added add to library option to savedObjectTagging test
@ThomThomson ThomThomson force-pushed the feature/timeToVisualizeRibbonCut branch from 9b596a1 to b33de6e Compare January 15, 2021 15:18
await label.click();

if (dashboardId) {
// TODO - selecting an existing dashboard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused with the flow here: is the goal to ensure just that the all dashboard selectors exist, without actually adding the Lens visualization to the dashboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as part of #83140, a new selector was added to the visualize save modal to allow users to add by value directly to a dashboard from visualize. That also means that in order to save it to the library, the user needs to select the add to library option on the dashboard selector.

What I've added here is a default path that says 'if the dashboard selection section exists, and we haven't been asked to add it directly to a dashboard, select the add to library option. This prevents a number of test failures - and you can see a similar implementation in the Visualize page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I've added here is a default path that says 'if the dashboard selection section exists, and we haven't been asked to add it directly to a dashboard, select the add to library option. This prevents a number of test failures - and you can see a similar implementation in the Visualize page.

nit: It might be helpful to extract this logic into another helper function that could be pulled into the lens & SO tagging functional tests. It feels like the type of implementation detail that other apps shouldn't necessarily need to concern themselves with when writing tests.

e.g. something like this could potentially be used everywhere:

await saveToNewDashboard();
await saveToExistingDashboard('my-dashboard-id');
await saveToLibrary();

@ThomThomson ThomThomson marked this pull request as ready for review January 15, 2021 17:47
@ThomThomson ThomThomson requested a review from a team January 15, 2021 17:47
@ThomThomson ThomThomson requested review from a team as code owners January 15, 2021 17:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@@ -20,7 +20,7 @@
import { schema, TypeOf } from '@kbn/config-schema';

export const configSchema = schema.object({
allowByValueEmbeddables: schema.boolean({ defaultValue: false }),
allowByValueEmbeddables: schema.boolean({ defaultValue: true }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@majagrubic majagrubic Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is the plan to enable this in 7.12 and then delete references to it in 7.13? Or are you also planning for a cleanup for 7.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's still up in the air - because removing the ability to turn the feature off could constitute a breaking change. Right now the consensus seems to be removing references to it in 8.0.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll craft a plan to at least deprecate with a warning in 8.0 for removal in a follow-on minor, if not remove outright. It kind of depends on feedback from the field.

Copy link
Contributor

@clintandrewhall clintandrewhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic... LGTM! 🚢

Congrats @elastic/kibana-presentation and @ThomThomson and @majagrubic, especially.

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates to core tests LGTM, just had one suggestion of a possible way to clean things up.

await label.click();

if (dashboardId) {
// TODO - selecting an existing dashboard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I've added here is a default path that says 'if the dashboard selection section exists, and we haven't been asked to add it directly to a dashboard, select the add to library option. This prevents a number of test failures - and you can see a similar implementation in the Visualize page.

nit: It might be helpful to extract this logic into another helper function that could be pulled into the lens & SO tagging functional tests. It feels like the type of implementation detail that other apps shouldn't necessarily need to concern themselves with when writing tests.

e.g. something like this could potentially be used everywhere:

await saveToNewDashboard();
await saveToExistingDashboard('my-dashboard-id');
await saveToLibrary();

@ThomThomson
Copy link
Contributor Author

nit: It might be helpful to extract this logic into another helper function

Good call! I've cleaned this up by extracting all of the setting of save modal values into a new function in visualize page. Updated everywhere else it's used to use the new function.

@ThomThomson ThomThomson force-pushed the feature/timeToVisualizeRibbonCut branch from 7a91769 to 068aab1 Compare January 15, 2021 23:12
@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@ThomThomson ThomThomson merged commit af7a577 into elastic:master Jan 18, 2021
ThomThomson added a commit to ThomThomson/kibana that referenced this pull request Jan 18, 2021
* Enable Time to Visualize by Default
ThomThomson added a commit that referenced this pull request Jan 18, 2021
* Enable Time to Visualize by Default
@kibanamachine
Copy link
Contributor

kibanamachine commented Mar 16, 2021

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [53f4b21]

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Project:TimeToVisualize release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embeddables by value
7 participants