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

Display agreements #1762

Merged
merged 6 commits into from
Feb 22, 2024
Merged

Display agreements #1762

merged 6 commits into from
Feb 22, 2024

Conversation

ajparsons
Copy link
Contributor

This PR adds basic support for displaying agreements in the Policy-for-MP page:

image

This doesn't directly deal with if agreements score for policies - that can be enabled after #1755 is merged however.

- Agreements live in json and are associated with policies
- Don't need a connection to MPs
- Uses date range to only show relevant agreements for an MP
@ajparsons ajparsons requested a review from dracos February 8, 2024 16:47
Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of tiny things. Nice to have a way to include these!
Only minor structural thing, and much easier the way you've done it, is that it feels like you'd want to have a Policy object containing its divisions and its agreements together. But I don't suggest trying to rejig everything to enable that :)

www/includes/easyparliament/member.php Outdated Show resolved Hide resolved
@ajparsons
Copy link
Contributor Author

Only minor structural thing, and much easier the way you've done it, is that it feels like you'd want to have a Policy object containing its divisions and its agreements together. But I don't suggest trying to rejig everything to enable that :)

Just for revisiting when this isn't fixed in 10 years time - do you mean like a policy->decisions that is a list of both?

In twfy-votes, there's a PolicyDecisionLink that can be specialised for Divisions or Agreements - the Policy object maintains two lists, but they can be combined easier. So could pull that concept back in at some point.

https://github.com/mysociety/twfy-votes/blob/main/src/twfy_votes/apps/policies/models.py#L163-L167

@dracos
Copy link
Member

dracos commented Feb 21, 2024

do you mean like a policy->decisions that is a list of both?

Sorry, no, wasn't clear, I didn't mean they'd be together as one list, but that they'd both be under one object for the policy, rather than be in two different things under Policies

@ajparsons ajparsons requested a review from dracos February 22, 2024 11:27
@ajparsons
Copy link
Contributor Author

Fixup commit fixes indenting

@ajparsons ajparsons merged commit ae6b735 into master Feb 22, 2024
8 checks passed
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.

2 participants