Wykres commitów

399 Commity (f7bc89c03e3e901c2ee4161b7bed0b67692db30c)

Autor SHA1 Wiadomość Data
Karl Hobley d50da87cf4 Get commenting stories working again 2021-05-03 17:05:56 +01:00
jacobtoppm 9b1156210c Prevent Draftail rerender when editing comments 2021-04-29 10:58:07 +01:00
jacobtoppm 6c3647f3c5 Fix comment reply actions padding 2021-04-28 17:36:07 +01:00
jacobtoppm 7be2006e8d Align comment notification with comment bottom 2021-04-28 16:21:52 +01:00
Matt Westcott cf3c328f71 Make StreamField block objects available globally 2021-04-28 09:16:58 +01:00
Matt Westcott cdeed1954e Implement telepath adapter for HalloRichTextArea
Fixes #7110
2021-04-28 09:15:18 +01:00
jacobtoppm 5dbcce4e1c Remove comment styles from further typing on enter, right/left arrow 2021-04-27 17:02:26 +01:00
Karl Hobley 5271b4e97a Lighten comment more actions icon 2021-04-27 15:45:29 +01:00
Matt Westcott 1061caa5ef Fix inconsistent StreamField ValidationError nesting
Fixes #7086. As per https://github.com/wagtail/wagtail/issues/7086#issuecomment-826945031, ensure that .as_data() is consistently called when telepath-packing ErrorList objects (so that we preserve any embedded ValidationError objects instead of casting them to strings), and introduce an explicit ValidationError class on the client side to make mismatches more obvious (and for future extensibility in case we need to attach more fancy logic to ValidationError).

Also add tests for setError, and fix rendering of StreamBlock non-field errors (selector to clear old errors was incorrect, and jest apparently doesn't support innerText).
2021-04-27 09:59:57 +01:00
jacobtoppm 53e55d28e6 Close comment menu when you click anywhere outside 2021-04-26 18:18:45 +01:00
Karl Hobley 44a3737266
Styling fixes for the "Are you sure?" prompt when deleting a comment/reply (#7101)
* Add a bit of bottom padding to "Are you sure?" buttons

* Change delete buttons from red to blue

* Right-align delete and cancel buttons

* Insert clearfix after delete/cancel buttons
2021-04-26 18:02:49 +01:00
Karl Hobley f15699414a Put notices straight after the relevant comment/reply 2021-04-26 17:38:52 +01:00
jacobtoppm dc95d6e22f Don't focus comments on menu click to avoid movement 2021-04-26 16:45:27 +01:00
Simon Evans 2f57a7a4e3 Fix jitter on draftail comment button icon 2021-04-26 15:55:24 +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
Matt Westcott 6395f4bcc1 Fix BooleanBlock for telepath
Fixes #7083. Override default FieldBlock / BoundWidget behaviour so that:

* BooleanBlock.get_form_state bypasses CheckboxInput.format_value (which Django uses to determine the 'value' HTML attribute rather than the checked state)
* BoundCheckboxInput.get_state / set_state / get_value work with the 'checked' attribute rather than 'value'
2021-04-26 12:39:04 +01:00
jacobtoppm 144a7a74d4 Add decorator to CommentableEditor even when disabled, as adding after first render doesn't work 2021-04-26 12:14:01 +01:00
Simon Evans 678e117081
Feature/commenting responsive layout (#7091)
* Improve commenting layout

* Improve mobile layout

* Position comments absolutely on mobile

* Remove mobile state toggle
2021-04-26 11:53:04 +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
Simon Evans 05f1eb51aa
Feature/commenting improve notification toggle UI (#7085) 2021-04-23 16:24:27 +01:00
jacobtoppm 8f85d95078 Hide comments for collapsed blocks and panels 2021-04-23 15:05:58 +01:00
jacobtoppm e09ab4e597 Move resolve action to comment menu 2021-04-23 15:05:36 +01:00
jacobtoppm d6ff2d51ea Fix comment menu on non-IE11 2021-04-23 15:05:36 +01:00
Karl Hobley e62103ae1c Remove field width transition when commenting is enabled/disabled 2021-04-23 13:42:43 +01:00
Jacob Topp-Mugglestone dba3a438c0
Feature/commenting disable on snippets (#7080)
* Default to comments disabled

* Don't depend on window.comments being defined
2021-04-22 17:23:03 +01:00
Karl Hobley d1115c463c
IE11 support for commenting (#7057)
* Polyfill URLSearchParams

* Workaround unimplemented methods for IE11

* Add a fallback for the <details>/<summary> elements
2021-04-22 15:58:08 +01:00
Karl Hobley 711a3310a7 Unfocus comment when user clicks cancel 2021-04-22 15:43:50 +01:00
jacobtoppm 333a22a274 Close the comment menu when unfocused, and focus the first menu item when opened as expected 2021-04-22 14:50:02 +01:00
jacobtoppm 97f605c14c Fix comments list height to prevent grey bar at bottom 2021-04-22 14:49:46 +01:00
jacobtoppm 1ff4bdceef Alter the date format on comments to match Wagtail listings 2021-04-21 13:39:05 +01:00
Simon Evans 471856a52c Feature/commenting add icons (#7046)
* Update commenting icons

* Add draftail commenting icon

* Fix draftail icon hover state and update snapshot
2021-04-20 18:25:30 +01:00
Simon Evans 1ac9a56279 Improve commenting layout 2021-04-20 18:25:30 +01:00
Karl Hobley b49c2e498b Update z-index of comments so they render behind main menu 2021-04-20 18:25:30 +01:00
jacobtoppm ca0154543a Use data-tab-nav to find tab nav everywhere 2021-04-20 18:25:30 +01:00
jacobtoppm 79baa145ac Add aria-describedby to comment textboxes 2021-04-20 18:25:30 +01:00
jacobtoppm 616f8e55b7 Remove non-tab li in tablist 2021-04-20 18:25:30 +01:00
jacobtoppm b6b43bcba2 Add menu role 2021-04-20 18:25:30 +01:00
jacobtoppm a18b1fa2b8 Show comments by default only if there are pre-existing comments 2021-04-20 18:25:30 +01:00
jacobtoppm 1c04d84f38 Highlight whole field when adding Draftail comment with collapsed selection 2021-04-20 18:25:30 +01:00
jacobtoppm ef638faf76 Allow CommentableEditor to be extended with plugins, controls, decorators 2021-04-20 18:25:30 +01:00
jacobtoppm 64f1cbdfd4 Remove completed TODO 2021-04-20 18:25:30 +01:00
jacobtoppm 25257de151 Prevent empty comment and reply submissions. 2021-04-20 18:25:30 +01:00
Jacob Topp-Mugglestone d727b2b922 Feature/commenting a11y pass 1 (#7016)
* Add a keyboard shortcut to Draftail for adding/focusing comments

* Increase the timeout for unfocusing comments to reflect doing it on mousedown

* Update react-focus-trap and add focus trap to comments

* Remove extra focusing logic and replace with focusTrap initialFocus argument

* Add forceFocus to tests

* Remove todo

* Update Draftail to 1.4.1 to allow plugin keyBindingFns to be called

* Remove now unneeded icon hiding css due to Draftail update

* Add data-comment-add class to buttons to prevent comment unfocus

* Prevent comment button showing on streamfield root, and attach contentpath to field parent for single field

* Add keyboard shortcut for field level comments

* Consolidate comments keyboard shortcut check in case we change, and use keyCode instead of key

* Formatting and eslint fixes

* Update tests
2021-04-20 18:25:30 +01:00
jacobtoppm dd90405aac Resolve comments when invalidating a contentpath, and delete unsaved comments 2021-04-20 18:25:30 +01:00
Karl Hobley 6e88b6c620 Fix new comments going to the top 2021-04-20 18:25:30 +01:00
Karl Hobley 0bb606a67d Hide buttons by default 2021-04-20 18:25:30 +01:00
Karl Hobley 5c8f8be904 Move comments toggle code into comments.js 2021-04-20 18:25:30 +01:00
Karl Hobley 1257816568 Add initCommentsInterface function 2021-04-20 18:25:30 +01:00
Karl Hobley 7411e278e0 Merge comments.js into entrypoint 2021-04-20 18:25:30 +01:00
Karl Hobley d4ba41f770 Make commentApp a module global (rather than putting it on the window) 2021-04-20 18:25:30 +01:00