v2.ocaml.org
v2.ocaml.org copied to clipboard
Made the function of the version selector on the documentation page more obvious
Issue Description
When users select a version from the version selector on the documentation page, the changes that are made to the page such as the links to the resources changing are not visible so the users might be confused about what the version selector is really doing Please include a summary of the issue. Changes made by the version selector not visible Fixes # (issue) Fixes #1310
Changes Made
Added the selected version to all the link texts whose links change when a version is selected. Please describe the changes that you made. Created a function to get the selected option's value and add it in front of the affected link texts.
Before

After
For Firefox
- Please check if the PR fulfills these requirements
- [x] PR is descriptively titled and links the original issue above
- [x] Before/after screenshots (if this is a layout change)
- [x] Details of which platforms the change was tested on (if this is a browser-specific change)
- [x] Context for what motivated the change (if this is a change to some content)
Thanks @Goodiec, that's great! :) Could you properly link the issue to the PR (i.e. write "Fixes #1310" instead of "Fixes # (issue) #1310")?
Thanks @Goodiec, that's great! :) Could you properly link the issue to the PR (i.e. write "Fixes #1310" instead of "Fixes # (issue) #1310")?
Done @pitag-ha, thank you.
This is looking great, one suggestion is that perhaps we don't need to add the version in quite so many places. For example Many latest tools are bundled... doesn't quite make sense. The ones I think we could drop are:
Many latest toolscheck the latest language extensionslatest Standard Libraryandlatest core libraryThe official latest OCaml Tutorial
Which I think is most of the ones in the paragraphs. The buttons could maybe read Some Button Text (<ocaml-version>)? This might help with the problem at the moment where we have latest Read the tutorials which would become Read the tutorials (latest)? What are your thoughts @Goodiec?
This is looking great, one suggestion is that perhaps we don't need to add the version in quite so many places. For example
Many latest tools are bundled...doesn't quite make sense. The ones I think we could drop are:
Many latest toolscheck the latest language extensionslatest Standard Libraryandlatest core libraryThe official latest OCaml TutorialWhich I think is most of the ones in the paragraphs. The buttons could maybe read
Some Button Text (<ocaml-version>)? This might help with the problem at the moment where we havelatest Read the tutorialswhich would becomeRead the tutorials (latest)? What are your thoughts @Goodiec?
Hi @patricoferris, I think your suggestion makes sense. I think instead of putting the version in brackets for just the buttons as you suggested, we could use the same style for those in the paragraphs that we are not dropping as well. I was also thinking that maybe adding a tooltip on the hover of the version controller to say that relevant links in the page will change when a particular version is selected, what do you think?
@patricoferris, made the changes based on your suggestion. Here's the image of how it looks:
I didn't implement the tooltip I suggested but here's an image showing how that would look:
I think the tooltip might be a bit too much too though, do you think it will be useful in addition to the change that has been made already?