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

[8.x] Improve URL drilldown authoring experience (#197454) #198796

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

close elastic#163642
close elastic#163641

As part of fix-it-week I picked up some of existing URL drilldown
authoring issues hoping to improve it a bit with a low effort (we don't
want to spend to much time on it).

Current URL drilldown authoring experience is terrible mainly because
there is no proper validation while creating the drilldown as we don't
have the needed runtime context. In the initial version we had a preview
but it was very limited and used "dummy" context and in some cases got
in the way by blocking the "save" button for URLs that would have been
valid in runtime. We simply removed the preview and validaiton on some
point later, so you can create an URL drilldown only by trial and error.
This is still the case in this PR, but it slightly improve the
experience:

Firstly, **ONLY IN EDIT MODE** instead of hidding "invalid" drilldowns,
we're showing them now with an error. This helps to find broken
drilldowns and address issues. fixes
elastic#163641

![Screenshot 2024-10-24 at 12 02
25](https://github.com/user-attachments/assets/2e33ad91-2425-417d-b44f-faff74fccbab)

This is far from ideal, but this is better from what we have now.
As for the error UI I wanted to use EuiIconTip, but it doesn't work well
when inside that context menu because tooltip is shown below the menu. I
didn't want to change zIndex as it might cause regressions in other
places, so I went for this inline error truncated after 3 lines and the
whole error is shown in native browser tooltip when hovered. The error
is also printed in console

In addition to that I've slightly improved the form editor experience
- Show simple non-blocking validation error (if URL is missing or the
pattern doesn't look like an URL)
- Add a help text about how to test and properly validate

<img width="576" alt="Screenshot 2024-10-24 at 15 35 01"
src="https://github.com/user-attachments/assets/248b5c03-d445-4b30-97a2-a0a9d6a055a4">
<img width="547" alt="Screenshot 2024-10-24 at 15 35 08"
src="https://github.com/user-attachments/assets/c265ee1c-94ec-4238-85fb-fc90f069f3b4">

This is again, not ideal, but slighltly better then before

(cherry picked from commit 014b956)
@kibanamachine kibanamachine merged commit 88926f3 into elastic:8.x Nov 4, 2024
27 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
uiActionsEnhanced 135.9KB 136.1KB +217.0B

Page load bundle

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

id before after diff
uiActionsEnhanced 17.3KB 17.6KB +315.0B
urlDrilldown 16.5KB 17.4KB +988.0B
total +1.3KB
Unknown metric groups

ESLint disabled line counts

id before after diff
uiActionsEnhanced 10 16 +6
urlDrilldown 4 7 +3
total +9

Total ESLint disabled count

id before after diff
uiActionsEnhanced 14 20 +6
urlDrilldown 4 7 +3
total +9

cc @Dosant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Feature:Drilldowns Embeddable panel Drilldowns
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants