-
Notifications
You must be signed in to change notification settings - Fork 6
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
MIR-1409 Allow to customize badges/icons in search results #1084
base: 2023.06.x
Are you sure you want to change the base?
MIR-1409 Allow to customize badges/icons in search results #1084
Conversation
…on modules overwriting of (open) access icon
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.
Ticket description is about making the icon configurable. If I understand this properly, someone who wishes to change the icon now has to override the new template file and recreate the whole content rendering the badges, coloring, title attribute and all, right?
I'm not sure that this is the right approach.
It it not about just the icon. In my application there are more states to consider, just on/off wordReadable it not enough. I do not want to fork the whole |
Please update the JIRA ticket description to better reflect the actual requirements. That being said, I'm not sure that having a separate template for just one of the badges is a good approach. What if someone wants to customize another badge? Should every badge have its own stylesheet? Then, having the code that actually renders a badge copied into many stylesheets doesn't really seem to be a good idea. What about adding additional or removing existing badges? What about badges at different places like the landing pages of publications? Imho, the badge system desperately requires a complete overhaul. I don't think, that the proposed changes move things in a fruitful direction. Changes to the existing system should therefor, for now, be as small and targeted as possible. If only the icons need to be configurable, I think, only the icons should be made configurable for now. |
Updated the JIRA-Ticket. As I already mentioned, its not just the icon. At the moment the icon is rendered on just one solr field "worldReadableComplete". But in my application I check for other fields as well. I agree that subsequently every part of the hit rendering code should be customizable. But I do not like to do that now as I currently just need to evaluate other solr index data to display a proper icon. I really do not see any problem with providing an extra template/stylesheet rendering that part of the page. The problem with MIR is that many stylesheets are huge af and there not much room for customization besides forking the whole stylesheet. The same goes for evaluating of access rights but that is another strory. |
Code duplication and extremely specific features that cannot be reused are also problematic in MIR. Maybe you could at least pull out the template for all existing badges into a separate stylesheet and split it into separate templates for the individual badges? That would allow to overwrite templates for individual badges using the Such a feature would at least be somewhat well-rounded. |
…ponseBadges to response-mir.xsl
The basket should also be considered, or rather result and basket should use the same stylesheets. Currently the whole thing is inconsistent af. I am also working on this problem and have just seen the PR... |
The badges shown in an object response page should also be harmonized with the badges in a search result page (and the basket listing). Also the use of tooltips, and mouseover effect like color changes and borders should be harmonized. Also, the generated HTML should be the same, so that just on set of CSS rulles needs to be maintained. Also, the selection and order of badges should be configurable. All in all, there should be a much larger re-engineering of the whole badge mechanism. This is definitely on my list and I have some ideas, but so far I didn't have the time to do it. But, in the meantime, I think it is okay to allow a PR that just tinker around a bit, as long as the changes are somewhat useful. In the now proposed solution, I don't like that the invocation of the templates for the various badges is hard coded in |
…nerating templates
MIR-1409