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.
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
Add club diff feature #705
base: master
Are you sure you want to change the base?
Add club diff feature #705
Changes from 2 commits
f56a70f
c89fc81
7dd0ad1
d82c835
01ccd5f
2ec546e
1c14e0a
1724ec7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 706 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L706
Check warning on line 709 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L709
Check warning on line 711 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L711
Check warning on line 716 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L716
Check warning on line 718 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're only reporting name, description, and image changes, do we need to diff every field? Hint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, in retrospect I'm not sure if this line is strictly necessary in the first place if we're computing diffs on the frontend (as discussed) anyways. We could compute on the backend but it would require more detailed serialization and not necessarily be much more performant at this scale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agreed. I'm sure React has some great diff libraries. I think it'd be cleaner to expose something that fetches the most recently approved version of a club, and we can do diffing on the frontend.
I'm also not sure where the
pending_clubs
endpoint would be used. We already know which clubs we want to diff (e.g. the ones in the approval queue), and I can't see where we'd use this outside of the queue.@Porcupine1 it'd be helpful to iron out the details with Julian further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we discussed that initially we were just the calling the clubs viewset list function with the approved = false and active = true query/search params. I added
pending_clubs
because we are now returning pending clubs dataCheck warning on line 720 in backend/clubs/models.py
Codecov / codecov/patch
backend/clubs/models.py#L720
Check warning on line 2107 in backend/clubs/views.py
Codecov / codecov/patch
backend/clubs/views.py#L2107
Check warning on line 2109 in backend/clubs/views.py
Codecov / codecov/patch
backend/clubs/views.py#L2109