-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[DataViewField] Allow to add a custom description for data view fields #168577
Conversation
Suggestion - make the description field a single row and place it beneath the name field. No toggle needed. I'd prefer to put the description inside the field list hover directly instead of having a hover in the hover. There should be a way of truncating it or perhaps having an expand and collapse. Perhaps limit it to 255 characters. It would be nice if the field search could also search descriptions, but that might be a follow up. |
@mattkime some good ideas 💡 I would be hesitant to include it in the field list to avoid using up that much space. Also might be look scattered if some fields have descriptions and others don't. What we could investigate perhaps is adding the "I" icon on the fields that have descriptions on the "main" list and not just the popover. I agree on placing it near the name (like mentioned on slack). ++ on the limit for 255 characters. @andreadelrio could charm in. BTW - we are planning some work on the field list for the near term, where this could be relevant to include. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and works great! I think this would definitely add value for users and is worth proceeding with. In the future we might be able to enhance the functionality with things like automatic descriptions for ECS fields, etc.
Suggestion - make the description field a single row and place it beneath the name field. No toggle needed.
I agree with this. The toggle feels unnecessary already so avoiding another one would be good. If we group them under one toggle, maybe we should rename it to something like "Set details".
I'd prefer to put the description inside the field list hover directly instead of having a hover in the hover. There should be a way of truncating it or perhaps having an expand and collapse.
I also think this could be a good idea. I took a quick attempt at it, were you thinking something along these lines?
What we could investigate perhaps is adding the "I" icon on the fields that have descriptions on the "main" list and not just the popover.
Personally I'd recommend against adding anything to the field list and keeping it only in the popover since the field list can already become crowded with long names and multiple icons.
hey team, this is a great feature, are we planning to show these field description also in Lens? :) |
@teresaalvarezsoler Since it's still in a PoC state I can't say for sure what the final experience will look like, but if we add the descriptions to the field list popover or somewhere else in the field list, then it should also be supported for Lens by default 🙂 |
…ption # Conflicts: # src/plugins/data_views/common/data_views/data_view.ts
/ci |
/ci |
/ci |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
limits.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code look good and works well. Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good, and I tested locally and it seems to be working well! Great work and LGTM 👍
src/plugins/data_view_field_editor/public/components/field_editor/field_detail.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vis team changes LGTM, tested the Lens field list and everything works as expected
…tor/field_detail.tsx Co-authored-by: amyjtechwriter <61687663+amyjtechwriter@users.noreply.github.com>
src/plugins/data_view_field_editor/public/components/field_editor/field_detail.tsx
Outdated
Show resolved
Hide resolved
…tor/field_detail.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one note from my end, multiline support shouldn't block from moving forward here, If it makes sense it could be done in a follow up. Something like this could also lead to edge cases, what would happen if there are lots of multilines like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResponseOps (Alerting) changes LGTM
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: cc @jughosta |
❤️ ❤️ ❤️ ❤️ |
- Follow up for #168577 ## Summary We should probably exclude `customDescription`s from the data view minimal spec as they tend to be long. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Closes elastic#187075 ## Summary This PR updates data view API docs. `customDescription` was added in elastic#168577 --------- Co-authored-by: Lisa Cawley <lcawley@elastic.co> Co-authored-by: Davis McPhee <davismcphee@hotmail.com> (cherry picked from commit cd4a782)
# Backport This will backport the following commits from `main` to `8.15`: - [[Discover] Update data view API docs (#187146)](#187146) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2024-07-11T09:33:52Z","message":"[Discover] Update data view API docs (#187146)\n\n- Closes https://github.com/elastic/kibana/issues/187075\r\n\r\n## Summary\r\n\r\nThis PR updates data view API docs. `customDescription` was added in\r\nhttps://github.com//pull/168577\r\n\r\n---------\r\n\r\nCo-authored-by: Lisa Cawley <lcawley@elastic.co>\r\nCo-authored-by: Davis McPhee <davismcphee@hotmail.com>","sha":"cd4a782cac7689b12087d2cdb0b2c9bcc676728e","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.16.0"],"title":"[Discover] Update data view API docs","number":187146,"url":"https://github.com/elastic/kibana/pull/187146","mergeCommit":{"message":"[Discover] Update data view API docs (#187146)\n\n- Closes https://github.com/elastic/kibana/issues/187075\r\n\r\n## Summary\r\n\r\nThis PR updates data view API docs. `customDescription` was added in\r\nhttps://github.com//pull/168577\r\n\r\n---------\r\n\r\nCo-authored-by: Lisa Cawley <lcawley@elastic.co>\r\nCo-authored-by: Davis McPhee <davismcphee@hotmail.com>","sha":"cd4a782cac7689b12087d2cdb0b2c9bcc676728e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187146","number":187146,"mergeCommit":{"message":"[Discover] Update data view API docs (#187146)\n\n- Closes https://github.com/elastic/kibana/issues/187075\r\n\r\n## Summary\r\n\r\nThis PR updates data view API docs. `customDescription` was added in\r\nhttps://github.com//pull/168577\r\n\r\n---------\r\n\r\nCo-authored-by: Lisa Cawley <lcawley@elastic.co>\r\nCo-authored-by: Davis McPhee <davismcphee@hotmail.com>","sha":"cd4a782cac7689b12087d2cdb0b2c9bcc676728e"}}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Summary
This PR extends Data View Field flyout with a new textarea to enter and save a custom field description. This description will be shown in a field popover for Discover sidebar, in Doc Viewer and also on Data View management page. Current limit for the custom description is 300.
When creating/editing a field:
In the field popover(truncated):
In the field popover(expanded):
In Doc Viewer popover(always expanded):
On Data View Management page(truncated):
Initial implementation examples
Checklist