-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conversation
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.
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. |
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. |
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. |
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. |
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. |
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?