v2.ocaml.org icon indicating copy to clipboard operation
v2.ocaml.org copied to clipboard

Made the function of the version selector on the documentation page more obvious

Open Goodiec opened this issue 4 years ago • 5 comments

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

ver-before

After

ver1 ver

For Firefox fire2 fire1

  • 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)

Goodiec avatar Apr 08 '21 23:04 Goodiec

Thanks @Goodiec, that's great! :) Could you properly link the issue to the PR (i.e. write "Fixes #1310" instead of "Fixes # (issue) #1310")?

pitag-ha avatar Apr 09 '21 15:04 pitag-ha

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.

Goodiec avatar Apr 09 '21 15:04 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 tools
  • check the latest language extensions
  • latest Standard Library and latest core library
  • The 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?

patricoferris avatar Apr 15 '21 08:04 patricoferris

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 tools
  • check the latest language extensions
  • latest Standard Library and latest core library
  • The 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?

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?

Goodiec avatar Apr 15 '21 09:04 Goodiec

@patricoferris, made the changes based on your suggestion. Here's the image of how it looks: ver

I didn't implement the tooltip I suggested but here's an image showing how that would look: tooltip

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?

Goodiec avatar Apr 26 '21 10:04 Goodiec