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

resultList: Add overridable descriptio #2971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@ class RecordsResultsListItem extends Component {
<Item className="creatibutors">
<SearchItemCreators creators={creators} othersLink={viewLink} />
</Item>
<Item.Description className="truncate-lines-2">
{descriptionStripped}
</Item.Description>
<Overridable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are nesting the overridables a bit too much. Shouldn't this be in the original component? RecordsResultsListItem one already overrides one, if I am not mistaken.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I fully understand, the RecordsResultsListItem.layout is an overridable already, but this will imply to copy over all this file and probably harder to mantain, that's why I thought about adding the overridable to the description

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouf, I thought https://github.com/inveniosoftware/invenio-search-ui/blob/master/invenio_search_ui/assets/semantic-ui/js/invenio_search_ui/components/ResultsListItem.js this was original component and RecordsResultsListItem only overrides it, but it is not the case. Ignore my comment :)

id={buildUID("RecordsResultsListItem.description", "", appName)}
descriptionStripped={descriptionStripped}
result={result}
>
<Item.Description className="truncate-lines-2">
{descriptionStripped}
</Item.Description>
</Overridable>

<Item.Extra>
{subjects.map((subject) => (
<Label key={subject.title_l10n} size="tiny">
Expand Down
Loading