[Lens] Add description property and check duplicate title on save#68219
[Lens] Add description property and check duplicate title on save#68219flash1293 merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
lukeelmers
left a comment
There was a problem hiding this comment.
Updated app arch typings LGTM
wylieconlon
left a comment
There was a problem hiding this comment.
Tested in Safari. LGTM, although I would be happy to have another way of organizing saved visualizations.
| @@ -34,10 +34,11 @@ export const getLensAliasConfig = (): VisTypeAlias => ({ | |||
| searchFields: ['title^3'], | |||
There was a problem hiding this comment.
This is weird, because I can definitely search the description when I type a unique string, but I think this is supposed to be:
| searchFields: ['title^3'], | |
| searchFields: ['title^3', 'description'], |
There was a problem hiding this comment.
@wylieconlon you got me curious about this one – I investigated a bit.
Turns out that the request doesn't use this param from here, but takes it from:
https://github.com/elastic/kibana/blob/master/src/plugins/visualizations/public/saved_visualizations/find_list_items.ts#L55
We search through both lens and visualize so I think it's good . Example of request:
http://localhost:5603/clb/api/saved_objects/_find?default_search_operator=AND&page=1&per_page=1000&search=lens_vis*&search_fields=title%5E3&search_fields=description&type=lens&type=visualization
|
@elasticmachine merge upstream |
@wylieconlon what do you have in mind? |
mbondyra
left a comment
There was a problem hiding this comment.
Tested on FF, both functionality and code looks good to me 🆗
…ana into lens-duplicate-title-check
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Fixes #64979
This PR uses the
checkForDuplicateTitlehelper function from thesaved_objectsplugin to make sure a Lens saved object is not saved with the same title as another existing saved object.As this helper was tied to the
SavedObjecttype (which is not used by Lens), the type had to be adjusted slightly (src/plugins/saved_objects/public/saved_object/helpers/check_for_duplicate_title.tsandsrc/plugins/saved_objects/public/saved_object/helpers/display_duplicate_title_confirm_modal.ts)While working on this, I discovered there is a textarea for the description in the save modal, but Lens saved objects don't include a description at all. This PR also passes the description through the various layers so it's saved and shown correctly