-
Notifications
You must be signed in to change notification settings - Fork 34
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
landing page: add blr related works section #674
Conversation
22c5a15
to
2ae3fd8
Compare
import { PropTypes } from "prop-types"; | ||
import { Input, Icon } from "semantic-ui-react"; | ||
|
||
export const BlrSearchBar = ({ |
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.
is this component any different that the default search bar? maybe I am missing context but my first thought is this PR recreates the whole search app and duplicates a lot of code. We could possibly use overridable features like in other searches.
I don't see any major layout difference with other searches, but correct me if I am missing something
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.
You're right, the search bar override is not needed I think. I think I can solve it with the props only. Thanks!
Do you mean the search app from invenio-search-ui? I'm overriding some ReactSearchKit components, but they would have to be overridden in any case, as the layout is not the same. I'm not sure I see the benefit of using invenio-search-ui here?
dc0ea53
to
d62d05f
Compare
8325992
to
82d70a3
Compare
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.
LGTM!
Just left a minor comment about the filter, the PR also need to be rebased there are conflicts.
|
||
export const Filter = ({ valuesCmp }) => { | ||
return ( | ||
<Dropdown text="Filter by type" button> |
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.
Comment: By using the text
prop, the user will not see what type of filter is selected unless (s)he opens the dropodwn. I find it more intuitive if once we have selected the filter it's value is displayed.
<Dropdown text="Filter by type" button> | |
<Dropdown placeholder="Filter by type" button> |
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.
Thanks! I do agree, although this dropdown is a bit different since it works like the filters on the regular search (with checkboxes), so multiple options can be checked.
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.
Right! Good point! In that case I would just display some text mentioning how many filters are selected like "X filters selected" so that the user is aware that there are filters selected when the dropdown is closed. However this can be addressed in another issue, if we do so please create the issue!
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.
Thanks! I will test it!
61893b9
to
4bb99cd
Compare
3986126
to
d4d71c7
Compare
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.
If meant to be reusable, it should be moved to InvenioRDM (maybe later?) and naming should be changed to be more generic (BLR -> Linked records).
@@ -138,4 +138,9 @@ a.inverted { | |||
.ui.medium.header { | |||
font-size: 1.45rem; | |||
} | |||
} | |||
|
|||
.image.thumbnail-image { |
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.
Does this works well in mobile version?
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.
|
||
return ( | ||
<> | ||
<Header as="h2">Linked records</Header> |
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.
Will Zenodo be available in multiple languages at some point? We might have to mark all strings as translatable.
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.
As far as I remember, it was a problematic thing to implement... but anyway that would be another task to go around and make all the strings translatable, for now doing that would be useless
|
||
return ( | ||
<> | ||
<Header as="h2">Linked records</Header> |
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.
This could be maybe moved to Jinja (if easy) to avoid the page flickering.
b7605d7
to
736cfe4
Compare
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 good overall, some minor comments and/or things to shelve.
Sign-off: @carlinmack @slint
site/zenodo_rdm/assets/semantic-ui/js/zenodo_rdm/src/blr-related-works/index.js
Outdated
Show resolved
Hide resolved
site/zenodo_rdm/assets/semantic-ui/js/zenodo_rdm/src/blr-related-works/BlrSearch.js
Show resolved
Hide resolved
site/zenodo_rdm/assets/semantic-ui/js/zenodo_rdm/src/blr-related-works/components/RecordItem.js
Show resolved
Hide resolved
site/zenodo_rdm/assets/semantic-ui/js/zenodo_rdm/src/blr-related-works/index.js
Outdated
Show resolved
Hide resolved
a1ba60d
to
86c460d
Compare
* search for related records only within BLR community * adjust empty search results to absence of search bar * add a new loader placeholder
86c460d
to
12b810a
Compare
Closes https://github.com/zenodo/rdm-project/issues/567
Needs inveniosoftware/react-searchkit#260
Edit: After discussing with Lars, it was decided to remove the search bar for now, as there are issues related to having the initial query string (to show only related results for the specific record) + additional query strings added by the user. In order to add the search bar back, these are the known alternatives that will need a solution:
queryString
), the string shows up in the input field. The input field should be empty, but the query string needs to remain.q
parameters once another search is performed.Screenshots