DISCOVER-Cookbook icon indicating copy to clipboard operation
DISCOVER-Cookbook copied to clipboard

Added dynamic version dropdown and static language switcher

Open AR21SM opened this issue 6 months ago • 2 comments

https://github.com/user-attachments/assets/2d73451d-a0ed-4d95-8b34-d8b07fe01317

AR21SM avatar Jun 16 '25 11:06 AR21SM

Hi @OriolAbril, I've now added the static language switcher using languages.json, and the dynamic version dropdown using versions.json. Could you please verify ??

AR21SM avatar Jun 16 '25 11:06 AR21SM

Thanks! I will try to review before the meeting tomorrow but there is high probability I won't be able. The video looks good and the modified lines summary of +167 −48 looks very promising too

OriolAbril avatar Jun 16 '25 15:06 OriolAbril

Even if we fixed this I don't think it is ready to merge yet

OriolAbril avatar Jun 24 '25 12:06 OriolAbril

Hi @OriolAbril, when you get a chance, could you please review this? I believe I’ve addressed all your feedback and implemented the changes as discussed in proposal #334

AR21SM avatar Jul 01 '25 18:07 AR21SM

Hi @OriolAbril Could you please verify ?? image

AR21SM avatar Jul 17 '25 20:07 AR21SM

I created a next branch so we can accept this without causing problems with the current workflow. https://github.com/numfocus/DISCOVER-Cookbook/tree/next

aterrel avatar Jul 22 '25 17:07 aterrel

Hi, @OriolAbril can you verify ?

AR21SM avatar Aug 02 '25 09:08 AR21SM

Hi @aterrel , Could you please add the next branch in Netlify so PR previews work for it too? 😊

AR21SM avatar Aug 02 '25 10:08 AR21SM

Previously

https://github.com/user-attachments/assets/2852ae2e-d3ac-4a4f-9298-ce3e90e7cc7c

Now

https://github.com/user-attachments/assets/8edb749d-3320-4c3c-971d-58ecb2d3481b

AR21SM avatar Aug 05 '25 13:08 AR21SM

@AR21SM you have to undo this commit fix: correct English URL structure in language switcher. There will be nothing at url/<version>/, the english version will be at url/<version>/en. Using sphinx-build -b html DISCOVER/ DISCOVER/_build/html/en in the bash script and then publishing DISCOVER/_build/html as is takes care of keeping the en/ folder instead of having the english version at the version root.

OriolAbril avatar Aug 05 '25 14:08 OriolAbril

The styling is a good start, we can continue polishing in follow up PRs. If you want to open an issue or a discussion to get an idea/proposal on what we want to happen do not hesitate to do so then tag us. In my opinion, we should try to match the look and behaviour of https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html as much as possible (we are using the compontent from the theme, but using a different theme, so it has many differences even if the core javascript to change the urls to matching ones is the same).

OriolAbril avatar Aug 05 '25 14:08 OriolAbril

https://github.com/user-attachments/assets/b4025902-6c1a-4a78-953c-0cc3885624ab

currently, it looks like this. I was thinking , should I reduce the font size (and box size) a bit and maybe add a little margin between the two buttons? Also, it’s placed at the left corner .Do you think that’s fine, or should I move it to the right or somewhere else? Open to any suggestions.

AR21SM avatar Aug 05 '25 15:08 AR21SM