0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-28 17:13:31 +01:00
Commit Graph

38 Commits

Author SHA1 Message Date
Karl Hobley
b9d61ab82a Use stubs in storybook 2021-05-03 17:05:56 +01:00
Karl Hobley
f15699414a Put notices straight after the relevant comment/reply 2021-04-26 17:38:52 +01:00
Karl Hobley
331a4f5719
Tweak comment warnings (#7102)
* Make "Are you sure?" on comment reply deletion correct size

* Update wording of warning after editing comment

* Tighten up height of comment warnings
2021-04-26 15:51:17 +01:00
Karl Hobley
c97bc56c68
Add warning to bottom of draft comments (#7089)
* Add warning to bottom of draft comments

* Add a warning to bottom of edited comments

* Add a warning at the bottom of comments with unsaved replies

* Set role="status" on the comment notice
2021-04-23 17:53:54 +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
54ce2f067f Remove 'SHOW_RESOLVED_COMMENTS' string 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
Helen C
5682aea460 Add the option to set images as decorative
If an image is decorative, the alt text will be set to be empty. If an image is not decorative, then alt text must be supplied for screen readers.
2021-01-29 10:24:14 +00:00
Karl Hobley
123d9cef92 Add locale indication to the React page explorer 2020-10-23 09:09:52 +01:00
Matt Westcott
499193d05c Pass snippet chooser URL via data attribute instead of chooserUrls 2020-09-30 22:05:45 +01:00
Maylon Pedroso
93a8227a52
Add edit button to draftail images and embeds blocks tooltip. Fix #2674 (#5885) 2020-07-23 13:55:38 +01:00
Karl Hobley
33b6d82033 Rename Admin API endpoint to "main" 2019-11-28 09:00:35 +00:00
Iman Syed
794d40b86b Add ability to create anchor link tab within rich text link
- add tests

- Update changelog & release notes
2019-08-18 15:56:20 +10:00
Helen Chapman
1e85ff454c Move focus to the pages explorer menu when open (#5336, #5394)
* Ensure that when you open the explorer the focus moves to the first link of the menu, and add a label for the explorer navigation
* Add dialog role to pages explorer popup, and ensure that there is an option to close the dialog window when tabbing by making the close button visually hidden rather than display none
2019-06-20 18:02:28 +01:00
Helen Chapman
e33732cc63 Add more contextual information for screen readers in the explorer menu’s links (#5335, #5386) 2019-06-19 15:19:41 +01:00
Helen Chapman
4b4db7d771 Adds screen-reader-only text to the close button for modals (#5274, #5377)
* Adds clearer text to the close button for modals
* Use existing wagtailConfig.STRINGS to store the new translatable string for JS, rather than introducing a new library.
* Update list of string constants for translation in the tests file
* Remove aria-hidden on modal dialog close button
2019-06-17 15:56:48 +01:00
Brady
e77338f1a3 Highlight broken links to pages and documents in rich text. Fix #4802 (#4813) 2019-02-02 17:04:01 +00:00
Matt Westcott
d9d1529cc0 Convert the document chooser modal to use static onload handlers 2018-06-20 15:35:41 +01:00
Matt Westcott
630a887d58 Convert the embed chooser modal to use static onload handlers 2018-06-20 15:35:41 +01:00
Matt Westcott
0ebf393b31 Convert the page/link chooser to use static onload handlers 2018-06-20 15:35:40 +01:00
Matt Westcott
aa9de4758f Use static onload handlers in the image chooser modal
Instead of passing an 'onload' JS function as part of the AJAX response for each step of the workflow,
we specify all onload handlers up-front when initialising ModalWorkflow, and return a 'step' field
in the response to indicate which one to trigger.
2018-06-20 15:35:39 +01:00
Thibaud Colas
c309753378
Expose reusable client-side code to build Draftail extensions (#4467)
* Expose Draftail package as global variable for reuse
* Expose Wagtail React components for reuse
* Expose Draftail-related React components for reuse
2018-04-18 00:27:07 +03:00
Thibaud Colas
7238f22ebd Improve error display cross-browsers, and add translatable string 2018-04-02 19:05:02 +03:00
Thibaud Colas
411895e450 Update labels to make editor reload feature more understandable 2018-04-02 19:04:38 +03:00
Thibaud Colas
19725330af Implement basic editor reloading 2018-04-02 17:24:57 +03:00
Thibaud Colas
7740d2d615 Add Draftail error handling component 2018-04-02 17:24:57 +03:00
Thibaud Colas
9861c2a0d4 Move Draftail tooltips portal closer to the editor to prevent background flickering 2018-02-12 21:54:08 +00:00
Thibaud Colas
ad2ec0b601 Add missing unit tests for Draftail JS code 2018-02-09 15:24:24 +00:00
Thibaud Colas
e4a06083af Add missed ellipsis in test stubs 2018-01-26 14:59:48 +00:00
Thibaud Colas
239365705c Finish making Draftail toolbar translatable 2018-01-18 18:32:16 +02:00
Thibaud Colas
4054fb2f18 Make all Draftail interface translatable 2018-01-17 22:19:37 +02:00
Janneke Janssen
28dd28187a Update React and related dependencies to latest versions
Updated snapshots due to the upgrade and failing ExplorerPanel test. This was due to the shallow call being made earlier than defining the document.body
Update to React 16
Update other dependencies
Stylelint updates
Remove unused imports
Update babel and gulp packages
Update package-lock
2018-01-17 21:48:17 +02:00
Janneke Janssen
2ff4a5aad1 Update explorer for latest scope, UI, with tests 2017-05-13 23:53:10 +03:00
Sævar Öfjörð Magnússon
81c6f3e3b1 Change explorer behavior for pages w/ children, with tests 2017-05-13 23:53:10 +03:00
Thibaud Colas
8bf2c9bf2e Refactor explorer code with tests using Jest 2017-05-13 23:53:10 +03:00
Josh Barr
d675807cf8 First version of the explorer on top of admin API 2017-05-13 23:53:10 +03:00
Josh Barr
14f02a0b50 Tooling for modern front-end components: React JS, ES6, and BEM CSS
Thanks to @justinvdm for the help

Merges: #2275
2016-02-25 13:32:48 +00:00