-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(ui) Display consistent search results in embedded searches #8597
feat(ui) Display consistent search results in embedded searches #8597
Conversation
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 reasonable - tested out the different variations where it's rendered already yeah? Like the Recommendations + results.
indeed i have |
/> | ||
)} | ||
{entityRegistry.renderSearchResult(entity.type, searchResult)} | ||
{entityAction && <EntityAction urn={entity.urn} type={entity.type} />} |
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.
we can test this using the metadata tests flow on acryl
bordered = true, | ||
entityAction, | ||
}: Props) => { | ||
export const EntityNameList = ({ entities, onClick }: Props) => { |
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.
Are we still using this component anywhere?
Makes an update so that embedded searches display the same search result card as regular search results. That means we show all the same info (usage stats, owners, all that good stuff).
Previously
EntityNameList
was being used in two different contexts - (1) embedded list searches (2) home page recommendation modules.The tough thing is that in order to display the regular search card, we need the whole
SearchResult
object which we have from embedded list searches but not in home page recommendations. So what I did was pull out the contents ofEntityNameList
and create a new component that is essentially the same but instead takes inSearchResult
objects instead ofEntity
objects and use the entity registry'srenderSearch
method which displays the full search result card.Then I stripped
EntityNameList
of any unused functionality so it only does what is needed for it from the recommendation modules. Therefore the diff is a little misleading here.Screenshot:
Checklist