-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/commenting #6
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
Open
djangodeveloper96
wants to merge
101
commits into
main
Choose a base branch
from
feature/commenting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add initial comment models, tests, and logic for updating comment foreignkeys when revisions are deleted
* 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
… 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
…ontend, and add forms to validate comments on save. (Comments are not yet output or written to the db)
… correctly by removing u-hidden class
…ing. This will allow comment instances with users to be extracted from the form instances, should the form fail to save
…saved comments are not lost in case the form was invalid and didn't save
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 <[email protected]> * Update getFullSelectionState comment Co-authored-by: Thibaud Colas <[email protected]> * Reorder selection state generation Co-authored-by: Thibaud Colas <[email protected]> * Remove unused argument Co-authored-by: Thibaud Colas <[email protected]> * 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 <[email protected]>
* Add initial draft of commenting update notes * Add code example for CommentPanel upgrade consideration * Remove unnecessary Draftail text format upgrade note
Pages often completely override content_panels since there is only one field by default. Moving CommentPanel to settings_panels means it's less likely to be overriden by mistake.
… footer css to use class selector instead of element
* Update commenting icons * Add draftail commenting icon * Fix draftail icon hover state and update snapshot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Thanks for contributing to Wagtail! 🎉
Before submitting, please review the contributor guidelines https://docs.wagtail.io/en/latest/contributing/index.html and check the following:
make lintfrom the Wagtail root)