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

Show status text for copies in color #606

Closed
wants to merge 2 commits into from

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Dec 11, 2020

This is to mimic the SLUB web catalog behavior (left web catalog, right app with this PR):
     

This also allows to click on links in the status text as in the web catalog (left old: no color, non-clickable, right new: color and clickable):
     

I used the same colors as for the status markers in the search result list view. The green could be a bit less bright to be better readable, like the green color in the web catalog on the left side. Would you want to change it or leave it as is?

using the same colors as for the small status markers in the search result
list view.
For SLUB, this saves the need to extract the text from the status html in the API.
See https://stackoverflow.com/a/20647011/3944322.
Needed for SLUB where copy status may be for instance "Ask availability
at ..." where ... is a link to the institute/chair where this book might
be available.
@StefRe
Copy link
Contributor Author

StefRe commented Dec 11, 2020

On second thought I think might be better to not directly put the color html into the status field in the API but rather supply a per-copy status code (Status.RED etc) in the copy object and do the coloring in the app.

@johan12345
Copy link
Collaborator

I would also prefer not to pass the color as HTML tags, but introduce an optional separate field with Status.RED/Status.YELLOW/Status.GREEN for each copy instead. This could then also be shown as a colored dot in the copy card (like in search results) instead of coloring the whole text (which, as you said, reduces the readability).

Supporting clickable links in the text looks fine to me, though.

@StefRe
Copy link
Contributor Author

StefRe commented Jan 18, 2021

This could then also be shown as a colored dot in the copy card (like in search results)

I personally find the colored text (left) looks better than the colored status icons (right) but if this is OK for you I'll amend this PR accordingly:

     

@raphaelm
Copy link
Member

I have no strong preference, I think both look pretty fine. I think if we go with colored text, though, we'd in fact need a darker shade of green.

@johan12345
Copy link
Collaborator

I think would prefer the colored icons, as they can be directly recognized from the search result list. For colored text we would definitely need to darken both the green and orange colors.

@StefRe
Copy link
Contributor Author

StefRe commented Mar 13, 2021

This PR is partly obsolete since SLUB changed the json output in Jan 2021. I'll split it into two separate new PRs: one for copies status colors and one for clickable links in the copy status field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants