-
Notifications
You must be signed in to change notification settings - Fork 0
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 Wagtail 6 support + extra way to create a sharing link #1
Commits on Oct 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f933896 - Browse repository at this point
Copy the full SHA f933896View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b1af63 - Browse repository at this point
Copy the full SHA 4b1af63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 819fffa - Browse repository at this point
Copy the full SHA 819fffaView commit details -
Configuration menu - View commit details
-
Copy full SHA for f075a9d - Browse repository at this point
Copy the full SHA f075a9dView commit details -
Support current draftsharing behaviour in Wagtail 6
This commit mirrors the current functionality for Wagtail 5 in Wagtail 6 by creating a Stimulus JS controller and hooking it into Wagtail in a similar way as for Wagtail 5. For the page history view, the HTML templating is different, so the previous approach overrode wagtailadmin/pages/revisions/_actions.html to slot in custom markup that the JS could hook into. For Wagtail 6 we do something similar, extending wagtailadmin/generic/history/action_cell.html to slot in a bit of custom markup. For snippet-list view, we update the HTML output for the share_url method to hook in the Stimulus controller used above. The JS in the Stimulus controller is deliberately very similar to the original JS. I wondered about refactoring out the main duplicated code (the main function which triggers the creation of new links via a POST to the backend, and the function which upgrades the View button on the list view of existing sharing links to be a clipboard link). However, for now - and with a view potentially to deprecating pre-Wagtail 6 behaviour - I've gone with some repetition rather than DRY code. Note that we don't load both JS files into the browser - we only load the appropriate one based on the version of Wagtail in use
Configuration menu - View commit details
-
Copy full SHA for c22b58b - Browse repository at this point
Copy the full SHA c22b58bView commit details -
Add an option in the main Page menu to create a draftsharing link
...if there is an unpublished draft that can be shared
Configuration menu - View commit details
-
Copy full SHA for 49af612 - Browse repository at this point
Copy the full SHA 49af612View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5619783 - Browse repository at this point
Copy the full SHA 5619783View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b1a34a - Browse repository at this point
Copy the full SHA 7b1a34aView commit details
Commits on Oct 2, 2024
-
Expand test coverage around expiry of links and setting expiry time d…
…uring link creation
Configuration menu - View commit details
-
Copy full SHA for 003f678 - Browse repository at this point
Copy the full SHA 003f678View commit details -
Configuration menu - View commit details
-
Copy full SHA for c133b19 - Browse repository at this point
Copy the full SHA c133b19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c8bf77 - Browse repository at this point
Copy the full SHA 6c8bf77View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d395e8 - Browse repository at this point
Copy the full SHA 6d395e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff0b469 - Browse repository at this point
Copy the full SHA ff0b469View commit details -
Rename snippet class to improve code comprehension a tiny bit
Bit of a nitpick here, I know - sorry!
Configuration menu - View commit details
-
Copy full SHA for 127802d - Browse repository at this point
Copy the full SHA 127802dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d4381d8 - Browse repository at this point
Copy the full SHA d4381d8View commit details
Commits on Oct 7, 2024
-
incl datetime_now -> timezone_now to avoid mis-assumption about which library it's from
Configuration menu - View commit details
-
Copy full SHA for 9f1ffa6 - Browse repository at this point
Copy the full SHA 9f1ffa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e9e444 - Browse repository at this point
Copy the full SHA 9e9e444View commit details -
Expand model test coverage to 100%; fixup test regression due to code…
… tidying earlier
Configuration menu - View commit details
-
Copy full SHA for cf7dfa3 - Browse repository at this point
Copy the full SHA cf7dfa3View commit details -
Brings coverage up to 98%, and effectively all code that needs coverage
Configuration menu - View commit details
-
Copy full SHA for 3172d68 - Browse repository at this point
Copy the full SHA 3172d68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 828b0f1 - Browse repository at this point
Copy the full SHA 828b0f1View commit details -
Address outlier case where, with Wagtail 5.1, the active_until field …
…was coming back as a naive datetime So we patch it in the tests and warn about it
Configuration menu - View commit details
-
Copy full SHA for 897adee - Browse repository at this point
Copy the full SHA 897adeeView commit details -
Update tox to cover more versions of Python, Wagtail and Django
Note the tolerance of a should-not-build version python3.12-django3.2-wagtail6.1 - may be there are better ways around that
Configuration menu - View commit details
-
Copy full SHA for b677cb9 - Browse repository at this point
Copy the full SHA b677cb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33035b9 - Browse repository at this point
Copy the full SHA 33035b9View commit details -
Switch to only using ruff, not black + isort + ruff
No need to have three things going when ruff does the lot
Configuration menu - View commit details
-
Copy full SHA for 8cbe7bc - Browse repository at this point
Copy the full SHA 8cbe7bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 56f5db0 - Browse repository at this point
Copy the full SHA 56f5db0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d61c5bb - Browse repository at this point
Copy the full SHA d61c5bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf09190 - Browse repository at this point
Copy the full SHA bf09190View commit details
Commits on Oct 8, 2024
-
Stabilise tests across Python 3.9 and/or Wagtail 5.1 by enforcing UTC…
… expiry timestamps Note the addition to the README, requiring the use of settings.USE_TZ=True
Configuration menu - View commit details
-
Copy full SHA for 91f78be - Browse repository at this point
Copy the full SHA 91f78beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99a2e7a - Browse repository at this point
Copy the full SHA 99a2e7aView commit details