Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Conversation

@takkaria
Copy link
Contributor

This is quite a big code dump, sorry about that, but it's reviewable commit-by-commit.

I would particularly like comments on the DRF code - I'm not very familiar with writing DRF views so I'm not sure if my style is right. Also whether factoring out of the assessment queryset to helpers.py makes sense.

@takkaria takkaria changed the title Image gallery get image gallery working again Nov 29, 2019
@takkaria
Copy link
Contributor Author

takkaria commented Dec 2, 2019

This has now been rebased onto master

Instead we calculate it ourselves on first save.  This is to avoid
Django re-calculating the values on every save, which requires access
to the file.  Since our images are effectively immutable, this isn't
something we ever need to do, and it makes testing more difficult.
It's more of a rewrite than a refactor.  It includes all the
functionality of the previous PHP-backed image gallery but also:
- looks nicer
- displays all the photos in a grid
- makes the 'edit note' functionality more visible
- Boosts the size of clickable areas for usability (this is a bit hacky
  right now - but it works and can be refined later if/when there is
  a broader usability overhaul)
- Uploads and deletes images in parallel

It's also written in a very different style to the rest of the code,
in a more modern JS features.
@takkaria takkaria merged commit cd77e82 into master Dec 6, 2019
@takkaria takkaria deleted the image-gallery branch December 6, 2019 12:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant