Simplified/centralised version dropdowns population (#1500) #1510
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.
This is related to ticket #1500
I did this as two separate commits and it's probably a good idea to evaluate this PR that way:
get_dropdown_versions
(néeversion_dropdown
/version_dropdown_strict
) with args.I chose to do point 2 in the BoostVersionMixin so we can use the data in a
dispatch()
or other similar method if needed instead of being limited to it only being set for the templates, and that potentially causing different datasets being populated or used by unfamiliar devs in the future.I'm not sure I like this, which is why I set it as two separate commits so it can be evaluated separately more easily. I think it might just be making the code more complicated for not a whole lot of benefit and it's not really saving us much in terms of queries, we need the partial to do one we wouldn't need otherwise because
get_object()
would otherwise provide that Library object, as you can see by the difference, but we can discuss it on Monday.I also think we can probably get rid of
path("homepage-beta/", HomepageBetaView.as_view(), name="home-beta"),
and the related code, that uses a versions dataset but seems like it's not referenced anywhere and hasn't been discussed on the discord channel in over a year.