Wykres commitów

11510 Commity (368049b83553bca2523ec9b46fc9ae7731f23e0c)

Autor SHA1 Wiadomość Data
jacobtoppm c49d6a7572 Prevent copying of comments when copying pages 2021-04-20 18:25:30 +01:00
jacobtoppm 7907aff7ff Use CSS variables for comment highlight colours 2021-04-20 18:25:30 +01:00
jacobtoppm 90114c246b Reduce line lengths and add longer variable names 2021-04-20 18:25:30 +01:00
jacobtoppm c6817cbb83 Remove use of magic number when retrieving comment ids 2021-04-20 18:25:30 +01:00
jacobtoppm 99b434c6f0 Prevent undo/redo from resurrecting invalid comment styles 2021-04-20 18:25:30 +01:00
jacobtoppm 73e41b34b0 Add logic to decorator, trying to ensure all reasonably added comments are clickable 2021-04-20 18:25:30 +01:00
jacobtoppm 5a9d5f6e4e Handle styling for overlapping comments, by using customStyleFn instead 2021-04-20 18:25:30 +01:00
jacobtoppm 3592aaba16 Don't decorate comment sections that overlap entities 2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone 7f528e7c93 Feature/redux comments (#6856)
Adds inline commenting to the Draftail editor (FE only), and refactors field level comments to subscribe to updates from the store directly



* Refactor field level comments to subscribe to updates directly from the commenting store, rather than calling methods on supplied widgets and annotations directly from the commenting app

* Update Draftail and React-Redux packages in preparation for Draftail inline commenting

* Add CommentableEditor version of Draftail as controlled component, in preparation for manipulating state from the comments system

* Only initialize CommentableEditor if comments are on and the contentpath is valid. Add a comment-adding control to CommentableEditor

* Update eslint

* Remove comment adding control from Draftail if comments are disabled

* fixup! Only initialize CommentableEditor if comments are on and the contentpath is valid. Add a comment-adding control to CommentableEditor

* Add decorator to comments, allowing them to be focused

* Add inline styling to comments

* Make Draftail instance accessible via the DOM node on CommentableEditor as well

* Force rerender for styles and decorators when necessary, and filter out deleted comments

* Remove comment styles when saving Draftail content

* Fix formatting error

* Remove unnecessary comment

* Don't use addition for string concatenation

* Newline

* Add explanatory comment about save logic

* fixup! Don't use addition for string concatenation

* Use more idiomatic undefined check

* Fix aria-label for comment button

* Use span to decorate link

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

* Update getFullSelectionState comment

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

* Reorder selection state generation

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

* Remove unused argument

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

* Make draftail position comments by median annotation, and pin by clicked comment

* Remove inline return

* Make setPinnedComment an option on setFocusedComment

* Add JSDoc comments and remove unused attribute

* use decoratorRef instead of Ref for clarity in annotation

* fixup! Update eslint

* Update Draftail snapshot

* Move entrypoint

* Prettier reformat and eslint fix

* Use Typescript for CommentableEditor

* Install types for react-redux and draft-js

* Remove unused popPage from interface

* Add draftjs-filters as an explicit dependency

* fixup! Use Typescript for CommentableEditor

* Add explicit type for timeout

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone ee5a147573 Add js translatable string for comment save warning (#6644) 2021-04-20 18:25:30 +01:00
jacobtoppm 198d65e5f7 Throw nicer error if comment element is missing and initialisation fails 2021-04-20 18:25:30 +01:00
jacobtoppm 11898a2606 Prefetch commenting users in one go 2021-04-20 18:25:30 +01:00
jacobtoppm 3e4eb8ae21 Replace apparent duplicate comments=[] in CommentPanel 2021-04-20 18:25:30 +01:00
jacobtoppm 6564302734 Tweak comment form error raising syntax and add full stops 2021-04-20 18:25:30 +01:00
jacobtoppm 1ef57ffe5e Remove unnecessary js template rendering 2021-04-20 18:25:30 +01:00
jacobtoppm 2db89a08d4 Add missing comment management form data to tests 2021-04-20 18:25:30 +01:00
jacobtoppm 4980de37f6 Import formatting 2021-04-20 18:25:30 +01:00
jacobtoppm 54ce2f067f Remove 'SHOW_RESOLVED_COMMENTS' string 2021-04-20 18:25:30 +01:00
jacobtoppm 2079e65001 Add tests for CommentPanel and reformat 2021-04-20 18:25:30 +01:00
jacobtoppm 2cc4bfdc27 Remove references to revision_resolved 2021-04-20 18:25:30 +01:00
jacobtoppm 59e8a9fd36 Extract comment instances from the form, not the page instance, so unsaved comments are not lost in case the form was invalid and didn't save 2021-04-20 18:25:30 +01:00
jacobtoppm a482cf2cea Make comments output themselves in a formset in the edit view 2021-04-20 18:25:30 +01:00
jacobtoppm 15e58f38a7 Add user to comment instance when cleaning data, rather than when saving. This will allow comment instances with users to be extracted from the form instances, should the form fail to save 2021-04-20 18:25:30 +01:00
jacobtoppm 83167456b5 Update revision_created when saving new comments 2021-04-20 18:25:30 +01:00
jacobtoppm a7a92a3106 Load comments from database to frontend. Ensure annotations are shown correctly by removing u-hidden class 2021-04-20 18:25:30 +01:00
jacobtoppm c8278956b3 Remove hardcoded comments div 2021-04-20 18:25:30 +01:00
jacobtoppm 1ca48eb31f Add structure of CommentPanel to initialize the comment app in the frontend, and add forms to validate comments on save. (Comments are not yet output or written to the db) 2021-04-20 18:25:30 +01:00
jacobtoppm 9a48221d66 Change comments to use ParentalKeys, so they can easily be saved with the page. Ensure they are treated on the 'page' rather than 'revision' level. Remove unnecessary revision_resolved field, as resolved comments will now simply be deleted 2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone 2ab917bc92 Feature/field comment frontend (#6530)
* Initial working version of comment frontend in edit view

* Make comment js text translatable

* Add comment icon

* Basic hardcoded comment adding widget

* Create widget object and register it with the comment app to subscribe to updates about related annotations and whether comments are shown

* Add data-contentpath attributes to field (and data-contentpath-disabled to fields which prevent a stable contentpath existing at this point - ie ListBlock block positions are not uniquely identified), and to ensure newly generated streamfield blocks also have a stable contentpath identifiable from the frontend, make streamfield uuids generate clientside

* Make comments detect new contentpaths, and move hardcoded comment widget on chooser template into js initialisation, also making new comment buttons init properly in new streamfield blocks

* Fix tests to expect contentpaths

* Remove two step comment widget initialisation, and replace with stored callbacks for widgets that try to initialise themselves before the comment app itself. Refactor widgets to receive the makeComment function directly from the commenting system via an onRegister method to accommodate this

* Use object argument instead of positional for FieldLevelCommentWidget constructor

* Use json_script to pass author to the comments system
2021-04-20 18:25:30 +01:00
jacobtoppm ab3c8d7d3d [Comments] Initial models (#6405)
Add initial comment models, tests, and logic for updating comment foreignkeys when revisions are deleted
2021-04-20 18:25:30 +01:00
Tom Dyson b48c6dab58 Replace Divio with Gitpod
The Divio demo environment no longer exists, as far as I can tell.
2021-04-20 17:19:33 +01:00
Coen van der Kamp 3b24868bf2 Add release note about reporting theme issues 2021-04-20 12:31:26 +02:00
Coen van der Kamp 3b3ae52509 Add Sphinx theme changelog and release notes 2021-04-20 11:45:19 +02:00
Coen van der Kamp ed4ed7a338
Add Sphinx Wagtail Theme (#6930)
Add Sphinx Wagtail Theme
2021-04-20 11:24:17 +02:00
Matt Westcott 7a741d770f Fix draftail focus test to use a fake timer 2021-04-20 09:46:45 +01:00
Matt Westcott f26f65a755 Convert NodeList to array before running forEach
Makes it work on IE11. Fix borrowed from https://github.com/wagtail/wagtail/pull/6109/files#r435561917
2021-04-20 09:46:45 +01:00
Matt Westcott b1c8142181 Delay focus on draftail widget for 50ms
This avoids an IndexSizeError on IE11 https://github.com/wagtail/wagtail/pull/6968#issuecomment-822591161 , apparently due to the focus triggering a field update before it has been fully initialised.
2021-04-20 09:46:45 +01:00
Matt Westcott f8299885aa Remove deprecated `providing_args` options on signals 2021-04-19 12:03:39 +01:00
Matt Westcott db1305f94c Fix API tests with an empty order_by clause
This works around a Django bug apparently introduced in 779e615e36
2021-04-19 12:03:39 +01:00
Matt Westcott 8d008bcfaf Ignore noise from warnings in test_check_invalid_base_form_class 2021-04-19 12:03:39 +01:00
Matt Westcott b455c659b7 Add default_auto_field to appconfigs to silence warnings 2021-04-19 12:03:38 +01:00
Matt Westcott 38f0cb44a4 Fix github action syntax 2021-04-19 12:03:38 +01:00
Matt Westcott e99c07a42e upgrade circleci python image to see if it fixes sqlite compatibility 2021-04-19 12:03:38 +01:00
Matt Westcott 8f5a2a8fe9 Formalise support for Django 3.2
Fixes #6981
2021-04-19 12:03:38 +01:00
Ihor Marhitych deeb771032 Save revision when restart workflow (#6990) 2021-04-19 11:02:49 +01:00
Dan Braghis b21557319c Release notes for #6946 2021-04-19 10:49:55 +01:00
Ihor Marhitych 37f4d4bab1 Do not instantiate PagePermissionTester for every ActionMenuItem 2021-04-19 10:44:30 +01:00
Ihor Marhitych 3bf8d12298 Use fewer db queries when checking current_workflow_task 2021-04-19 10:43:18 +01:00
Matt Westcott 00aea17030 Fill in release date for 2.12.4 2021-04-19 10:10:42 +01:00
Matt Westcott b3f3df2764 Release note for CVE-2021-29434 in 2.11.7 2021-04-19 10:09:57 +01:00