feat(UI): Add possibility to choose exercise display order #554
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR provides users with the ability to sort exercises in the exercises index based on various criteria derived from metadata. The initial version relies solely on groups structured according to the exercise provider's preference, which we refer to as "By legacy". The list of newly added sorting options includes:
This PR is closely related to the upgrade of the public corpus, which adds a logical progression to follow and fresh new exercises for practicing OCaml programming language.
Regarding the specific code base changes, all callbacks triggered by clicking on one of the buttons (Exercises, Playground, Lessons, etc.) now have a common type called
tab_handler
. Previously, each of these callbacks generated the content of the main page without allowing the main page to be divided into multiple modes (in our case, these modes are exercise sorting modes). To address this, an optional argument?clear_cache
was added to prevent the page from always rendering in its initial state.Co-authored-by: Dario Pinto (@RadioPotin)