Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [Improve URL drilldown authoring experience (#197454)](#197454) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Anton Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-04T14:16:11Z","message":"Improve URL drilldown authoring experience (#197454)\n\n## Summary\r\n\r\nclose https://github.com/elastic/kibana/issues/163642\r\nclose https://github.com/elastic/kibana/issues/163641\r\n\r\nAs part of fix-it-week I picked up some of existing URL drilldown\r\nauthoring issues hoping to improve it a bit with a low effort (we don't\r\nwant to spend to much time on it).\r\n\r\nCurrent URL drilldown authoring experience is terrible mainly because\r\nthere is no proper validation while creating the drilldown as we don't\r\nhave the needed runtime context. In the initial version we had a preview\r\nbut it was very limited and used \"dummy\" context and in some cases got\r\nin the way by blocking the \"save\" button for URLs that would have been\r\nvalid in runtime. We simply removed the preview and validaiton on some\r\npoint later, so you can create an URL drilldown only by trial and error.\r\nThis is still the case in this PR, but it slightly improve the\r\nexperience:\r\n\r\nFirstly, **ONLY IN EDIT MODE** instead of hidding \"invalid\" drilldowns,\r\nwe're showing them now with an error. This helps to find broken\r\ndrilldowns and address issues. fixes\r\nhttps://github.com//issues/163641\r\n\r\n![Screenshot 2024-10-24 at 12 02\r\n25](https://github.com/user-attachments/assets/2e33ad91-2425-417d-b44f-faff74fccbab)\r\n\r\nThis is far from ideal, but this is better from what we have now. \r\nAs for the error UI I wanted to use EuiIconTip, but it doesn't work well\r\nwhen inside that context menu because tooltip is shown below the menu. I\r\ndidn't want to change zIndex as it might cause regressions in other\r\nplaces, so I went for this inline error truncated after 3 lines and the\r\nwhole error is shown in native browser tooltip when hovered. The error\r\nis also printed in console\r\n\r\nIn addition to that I've slightly improved the form editor experience \r\n- Show simple non-blocking validation error (if URL is missing or the\r\npattern doesn't look like an URL)\r\n- Add a help text about how to test and properly validate \r\n\r\n<img width=\"576\" alt=\"Screenshot 2024-10-24 at 15 35 01\"\r\nsrc=\"https://github.com/user-attachments/assets/248b5c03-d445-4b30-97a2-a0a9d6a055a4\">\r\n<img width=\"547\" alt=\"Screenshot 2024-10-24 at 15 35 08\"\r\nsrc=\"https://github.com/user-attachments/assets/c265ee1c-94ec-4238-85fb-fc90f069f3b4\">\r\n\r\n\r\nThis is again, not ideal, but slighltly better then before","sha":"014b956002fab12064e2ac729c09b1713ef8deac","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Drilldowns","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"Improve URL drilldown authoring experience ","number":197454,"url":"https://github.com/elastic/kibana/pull/197454","mergeCommit":{"message":"Improve URL drilldown authoring experience (#197454)\n\n## Summary\r\n\r\nclose https://github.com/elastic/kibana/issues/163642\r\nclose https://github.com/elastic/kibana/issues/163641\r\n\r\nAs part of fix-it-week I picked up some of existing URL drilldown\r\nauthoring issues hoping to improve it a bit with a low effort (we don't\r\nwant to spend to much time on it).\r\n\r\nCurrent URL drilldown authoring experience is terrible mainly because\r\nthere is no proper validation while creating the drilldown as we don't\r\nhave the needed runtime context. In the initial version we had a preview\r\nbut it was very limited and used \"dummy\" context and in some cases got\r\nin the way by blocking the \"save\" button for URLs that would have been\r\nvalid in runtime. We simply removed the preview and validaiton on some\r\npoint later, so you can create an URL drilldown only by trial and error.\r\nThis is still the case in this PR, but it slightly improve the\r\nexperience:\r\n\r\nFirstly, **ONLY IN EDIT MODE** instead of hidding \"invalid\" drilldowns,\r\nwe're showing them now with an error. This helps to find broken\r\ndrilldowns and address issues. fixes\r\nhttps://github.com//issues/163641\r\n\r\n![Screenshot 2024-10-24 at 12 02\r\n25](https://github.com/user-attachments/assets/2e33ad91-2425-417d-b44f-faff74fccbab)\r\n\r\nThis is far from ideal, but this is better from what we have now. \r\nAs for the error UI I wanted to use EuiIconTip, but it doesn't work well\r\nwhen inside that context menu because tooltip is shown below the menu. I\r\ndidn't want to change zIndex as it might cause regressions in other\r\nplaces, so I went for this inline error truncated after 3 lines and the\r\nwhole error is shown in native browser tooltip when hovered. The error\r\nis also printed in console\r\n\r\nIn addition to that I've slightly improved the form editor experience \r\n- Show simple non-blocking validation error (if URL is missing or the\r\npattern doesn't look like an URL)\r\n- Add a help text about how to test and properly validate \r\n\r\n<img width=\"576\" alt=\"Screenshot 2024-10-24 at 15 35 01\"\r\nsrc=\"https://github.com/user-attachments/assets/248b5c03-d445-4b30-97a2-a0a9d6a055a4\">\r\n<img width=\"547\" alt=\"Screenshot 2024-10-24 at 15 35 08\"\r\nsrc=\"https://github.com/user-attachments/assets/c265ee1c-94ec-4238-85fb-fc90f069f3b4\">\r\n\r\n\r\nThis is again, not ideal, but slighltly better then before","sha":"014b956002fab12064e2ac729c09b1713ef8deac"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197454","number":197454,"mergeCommit":{"message":"Improve URL drilldown authoring experience (#197454)\n\n## Summary\r\n\r\nclose https://github.com/elastic/kibana/issues/163642\r\nclose https://github.com/elastic/kibana/issues/163641\r\n\r\nAs part of fix-it-week I picked up some of existing URL drilldown\r\nauthoring issues hoping to improve it a bit with a low effort (we don't\r\nwant to spend to much time on it).\r\n\r\nCurrent URL drilldown authoring experience is terrible mainly because\r\nthere is no proper validation while creating the drilldown as we don't\r\nhave the needed runtime context. In the initial version we had a preview\r\nbut it was very limited and used \"dummy\" context and in some cases got\r\nin the way by blocking the \"save\" button for URLs that would have been\r\nvalid in runtime. We simply removed the preview and validaiton on some\r\npoint later, so you can create an URL drilldown only by trial and error.\r\nThis is still the case in this PR, but it slightly improve the\r\nexperience:\r\n\r\nFirstly, **ONLY IN EDIT MODE** instead of hidding \"invalid\" drilldowns,\r\nwe're showing them now with an error. This helps to find broken\r\ndrilldowns and address issues. fixes\r\nhttps://github.com//issues/163641\r\n\r\n![Screenshot 2024-10-24 at 12 02\r\n25](https://github.com/user-attachments/assets/2e33ad91-2425-417d-b44f-faff74fccbab)\r\n\r\nThis is far from ideal, but this is better from what we have now. \r\nAs for the error UI I wanted to use EuiIconTip, but it doesn't work well\r\nwhen inside that context menu because tooltip is shown below the menu. I\r\ndidn't want to change zIndex as it might cause regressions in other\r\nplaces, so I went for this inline error truncated after 3 lines and the\r\nwhole error is shown in native browser tooltip when hovered. The error\r\nis also printed in console\r\n\r\nIn addition to that I've slightly improved the form editor experience \r\n- Show simple non-blocking validation error (if URL is missing or the\r\npattern doesn't look like an URL)\r\n- Add a help text about how to test and properly validate \r\n\r\n<img width=\"576\" alt=\"Screenshot 2024-10-24 at 15 35 01\"\r\nsrc=\"https://github.com/user-attachments/assets/248b5c03-d445-4b30-97a2-a0a9d6a055a4\">\r\n<img width=\"547\" alt=\"Screenshot 2024-10-24 at 15 35 08\"\r\nsrc=\"https://github.com/user-attachments/assets/c265ee1c-94ec-4238-85fb-fc90f069f3b4\">\r\n\r\n\r\nThis is again, not ideal, but slighltly better then before","sha":"014b956002fab12064e2ac729c09b1713ef8deac"}}]}] BACKPORT--> Co-authored-by: Anton Dosov <[email protected]>
- Loading branch information