Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified/centralised version dropdowns population (#1500) #1510

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

daveoconnor
Copy link
Collaborator

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:

  1. the centralization of the dropdown population to be based around get_dropdown_versions (née version_dropdown/version_dropdown_strict) with args.
  2. The movement of that to a higher level so it's set earlier in the flow.

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.

@daveoconnor daveoconnor force-pushed the doc/1500-context-versions-consolidation branch from 60d3fa8 to 98313d6 Compare November 30, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant