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

[Legacy Input Controls] Show deprecation badge in Dashboard #174302

Merged

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Jan 4, 2024

Summary

Closes #134050.

This adds a deprecation badge to legacy input control panels on dashboards. This badge is only visible in edit mode. I've also added support for displaying tooltips on badges shown in the embeddable panel header when getDisplayNameTooltip is defined.

Screenshot 2024-01-04 at 3 43 15 PM

Testing

In order to test this, set disableCreate: false in the InputControlVis vis type definition to add a legacy input control to a dashboard if you don't have an existing dashboard that contains a legacy input control.

disableCreate: true, // input controls are deprecated and input control creation has been permanently disabled

@cqliu1 cqliu1 requested a review from a team as a code owner January 4, 2024 21:14
@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jan 4, 2024
@cqliu1 cqliu1 added Feature:Dashboard Dashboard related features Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Feature:Embeddables Relating to the Embeddable system v8.13.0 and removed Feature:Embedding Embedding content via iFrame labels Jan 4, 2024
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

While I know this is temporary, it's still best practice not to put code meant for specific embeddable types into the generic Embeddable code.

Instead, it would be much cleaner to create and register a new Action onto the panelBadge trigger. This way all of the code for it can be contained within the Legacy input controls plugin.

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jan 4, 2024
@cqliu1 cqliu1 force-pushed the input-control-vis/show-deprecation-warning branch from c30367e to 5914540 Compare January 4, 2024 23:46
@cqliu1 cqliu1 requested a review from a team as a code owner January 4, 2024 23:46
@cqliu1
Copy link
Contributor Author

cqliu1 commented Jan 4, 2024

@ThomThomson I updated the PR and registered an input control deprecation badge instead of hardcoding the badge into the embeddable panel header component.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
inputControlVis 45 46 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
embeddable 12.0KB 12.2KB +160.0B
inputControlVis 49.9KB 49.8KB -96.0B
total +64.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
inputControlVis 5.6KB 6.7KB +1.1KB

History

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

@ThomThomson ThomThomson self-requested a review January 5, 2024 15:51
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Nice work Catherine, thanks for the quick turnaround on the strategy for this one.

Code only review, LGTM!

@cqliu1 cqliu1 merged commit 13fa875 into elastic:main Jan 5, 2024
19 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 5, 2024
@cqliu1 cqliu1 deleted the input-control-vis/show-deprecation-warning branch January 5, 2024 19:47
delanni pushed a commit to delanni/kibana that referenced this pull request Jan 11, 2024
…174302)

## Summary

Closes elastic#134050.

This adds a deprecation badge to legacy input control panels on
dashboards. This badge is only visible in edit mode. I've also added
support for displaying tooltips on badges shown in the embeddable panel
header when `getDisplayNameTooltip` is defined.

<img width="468" alt="Screenshot 2024-01-04 at 3 43 15 PM"
src="https://github.com/elastic/kibana/assets/1697105/c3e8c8d2-d2df-4880-acbb-f13c5c5222bc">

#### Testing
In order to test this, set `disableCreate: false` in the
`InputControlVis` vis type definition to add a legacy input control to a
dashboard if you don't have an existing dashboard that contains a legacy
input control.


https://github.com/elastic/kibana/blob/46a58541fa8ce21f86a32408cbc759c1bf22487b/src/plugins/input_control_vis/public/input_control_vis_type.ts#L33

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…174302)

## Summary

Closes elastic#134050.

This adds a deprecation badge to legacy input control panels on
dashboards. This badge is only visible in edit mode. I've also added
support for displaying tooltips on badges shown in the embeddable panel
header when `getDisplayNameTooltip` is defined.

<img width="468" alt="Screenshot 2024-01-04 at 3 43 15 PM"
src="https://github.com/elastic/kibana/assets/1697105/c3e8c8d2-d2df-4880-acbb-f13c5c5222bc">

#### Testing
In order to test this, set `disableCreate: false` in the
`InputControlVis` vis type definition to add a legacy input control to a
dashboard if you don't have an existing dashboard that contains a legacy
input control.


https://github.com/elastic/kibana/blob/46a58541fa8ce21f86a32408cbc759c1bf22487b/src/plugins/input_control_vis/public/input_control_vis_type.ts#L33

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Dashboard Dashboard related features Feature:Embeddables Relating to the Embeddable system Feature:Embedding Embedding content via iFrame Feature:Input Control Input controls visualization impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:enhancement review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Controls] Display that controls are deprecated on older migrated dashboards
6 participants