Wykres commitów

11378 Commity (f7bc89c03e3e901c2ee4161b7bed0b67692db30c)

Autor SHA1 Wiadomość Data
Karl Hobley a5624a3e09 Replace comment icon with comment-dots 2021-04-20 18:25:30 +01:00
Karl Hobley 3174ffee08 Add commenting controls 2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone 779f50aa3c Draftail comment styling
* Add right hand alignment and teal colour to Draftail comment control

* Add css fix for empty comment styles

* Update comment highlight colours
2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone ebdb3efbe6 Feature/comment resolving (#6975)
* Prevent deleted comments being undeleted when the page form is invalid

* Add resolved state for comments
2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone d64dad9739 Add save warning to page editor for comments and edits 2021-04-20 18:25:30 +01:00
Karl Hobley c619261565 Fix icons in comments 2021-04-20 18:25:30 +01:00
Karl Hobley c9ebfab6f0 Delete topbar component 2021-04-20 18:25:30 +01:00
Karl Hobley bbbc31ff60 Merge Wagtail Comment Frontend (#6953)
* Copy code from wagtail-comment-frontend

Exact copy of the src directory from:
4486c2fc32

* Integrate commenting code

* Linting
2021-04-20 18:25:30 +01:00
Karl Hobley daada5b4c8 Add a couple more JS translation strings 2021-04-20 18:25:30 +01:00
Karl Hobley 673a5e7bd2 Add Avatar URLs into authors data 2021-04-20 18:25:30 +01:00
Karl Hobley bd606ab15c Assign new block id on insert 2021-04-20 18:25:30 +01:00
Karl Hobley f2d763909f Set data-contentpath on struct children 2021-04-20 18:25:30 +01:00
Karl Hobley 7d50943c01 Set data-contentpath on sequence children 2021-04-20 18:25:30 +01:00
jacobtoppm 4aa2753762 Install redux types 2021-04-20 18:25:30 +01:00
jacobtoppm 7aa9803636 Add BE logic for updating and outputting comment positions 2021-04-20 18:25:30 +01:00
jacobtoppm f4192f2361 Break out position updating into separate function 2021-04-20 18:25:30 +01:00
jacobtoppm 495384ad26 Add comment position saving and loading from the database 2021-04-20 18:25:30 +01:00
jacobtoppm 211abd19bf Persist block key between Draftail blocks and database html. This will allow inline comment positions to be stable between revisions 2021-04-20 18:25:30 +01:00
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