-
Notifications
You must be signed in to change notification settings - Fork 59
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
Indicator search #1454
Indicator search #1454
Conversation
|
Latest commit re-implements the idea using an external js package : minisearch. I have given some basic options, but this will allow for more complex features when needed. I spend way to much time debugging JS... NBsphinx imports a package ( EDIT: With most browsers, the Indicators page will not work anymore if you access it with |
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, but I don't know jinja well enough. Does everything in sphinx work properly? require.js is loaded, etc?
Finally, clicking on the python name for the indicator doesn't seem to consistently point to the id tag in the api page. |
Ach, the I also fixed the link. I confused "realm" and "module", which is different for the "virtual modules" (icclim, anuclim). |
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.
Ok, looks good now. One thing that might be worth noting is that the search function for the whole site now has two drawbacks:
- Does not include snippet of the search result
- Does not include non-api version of the indicators (Possibly infeasible with the way this is coded?)
Is the YAML ID necessary ? It seems overly technical for an overview page. |
Everybody does the mistake where when building a yaml they put the python namespace name in the Ok, not so many people have shared with me their experience in setting up a yaml module, but still I have a 100% error rate for those who did ;). I see how someone knowing xclim and just wanting to build a quick module would appreciate not having to click on each indicator in order to populate their yaml ? |
Ok, fair enough. Pushed some code to add a mouseover for variables. Changes the styling cause I used a button tag. Having someone with CSS flair look at the styling would be good at this point. |
@Zeitsperre I think I fixed it ? |
The Indicator cards are looking good now, well done!
Is this still the case? Is there a workaround that you could implement? I tend to build docs locally to preview them, but I suppose we can simply leverage RTD builds for interaction testing? |
|
@huard What is this sorcery? Could you modify the Makefile's |
@Zeitsperre here you go! |
Do you know how to enforce copying static files to the build directory ? |
Hum, that's what the |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
Does this PR introduce a breaking change?
No.
Other information:
The changes are usable on RTD's build : https://xclim--1454.org.readthedocs.build/en/1454/indicators.html
The first commit is only a prototype. For now, it shows a list of indicators with title, python name and variables. The list is searchable by "free text", but it only looks in the titles. I'd like to: