-
Notifications
You must be signed in to change notification settings - Fork 176
frontend: add direct link to request if user has access #3251
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
Conversation
6e3d6cb to
aeb27a9
Compare
aeb27a9 to
4e2d526
Compare
794ddee to
30c8897
Compare
kpsherva
left a comment
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, the only doubt I have is about title changing placement when there is no "view comments" link on record landing page - maybe it would be better if all the titles are top-align, it would probably look strange if one community entry has the link and other (of the same record) doesn't
| Output: {<Community-UUID>: <Request-UUID>} | ||
| """ | ||
| can_review = current_rdm_records.records_service.check_permission( |
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.
Should this be "can_preview"? This would also include the links with guest token who would have access.
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.
could you explain why can preview? From what I understand can preview refers to people who can preview a draft, whereas review is people who can review the record (i.e. see the request)
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.
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 need to update our docs then ahah https://help.zenodo.org/docs/share/about/
| href={`${community.links.self_html}requests/${ | ||
| recordRequests[community.id] |
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.
I think we would also need to propagate guest token here.
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.
Can guests see requests? I thought guest tokens are for previewing a draft/viewing restricted files/editing a draft
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.
Yes, see the screenshot above ^^
...io_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js
Outdated
Show resolved
Hide resolved
| data-pending-communities-search-config='{{ search_app_rdm_record_requests_config(app_id="InvenioAppRdm.RecordRequests", endpoint=record_ui["links"]["requests"]) | tojson }}' | ||
| data-permissions='{{ permissions | tojson }}' | ||
| data-record='{{ record_ui | tojson }}' | ||
| data-record-requests='{{ record_requests | default({}) | tojson }}' |
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 the default needed, I assume the record_requests in this case would be empty when passed, so maybe we don't need it
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.
no, it is passed as undefined to the HTML in the case of the review page for example. This is a safeguard as otherwise the page doesn't render (undefined is not valid json)
c3e008d to
c05c5c2
Compare
also * correct URL error which silently redirected correctly * sort requests so that newest is linked
* smaller action buttons * match record request link to the one in modal * increase size of community icon
c05c5c2 to
6ec5393
Compare
6ec5393 to
a81f346
Compare

❤️ Thank you for your contribution!
Closes inveniosoftware/invenio-requests#497
Description
Before

After

Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Frontend
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: