0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 01:22:07 +01:00
Commit Graph

527 Commits

Author SHA1 Message Date
Karl Hobley
4daeed1bf5 Add locale filter into snippet chooser (#6699) 2021-05-17 13:24:03 +01:00
Karl Hobley
e67fb23ea8 Add JS and CSS entrypoints for new sidebar 2021-05-17 11:48:29 +01:00
Karl Hobley
04deadedba Move legacy sidebar JS into a separate module 2021-05-17 11:48:29 +01:00
Matt Westcott
cfadc59acc Fix eslint/csslint warnings about line length / indenting 2021-05-13 16:09:02 +01:00
Coen van der Kamp
95693efc10
Disable options without translated parent. Add help text. (#7171) 2021-05-12 13:49:36 +01:00
Matt Westcott
3f128b554e
Prevent JS error on URL hashes that are not tabs (#7169)
The tab code looks for the presence of a URL hash and calls showTab on a link with that href, without checking that the link A) actually exists and B) is a tab as identified by the data-tab attribute. As a result, non-tab-related uses of URL hashes (such as simply visiting /admin/#foo) throw a JS error.
2021-05-07 17:02:08 +01:00
Matt Westcott
c1d3b87674
Prevent StreamField initialisation from being broken by colliding HTML IDs (#7152)
Fixes #7146 - the root StreamField element is now matched by ID _and_ having a data-block attribute. (Duplicate IDs are invalid HTML and the 'proper' fix would be to add a global prefix to form fields, particularly since this problem isn't necessarily specific to StreamFields - but that would be a bigger breaking change.)
2021-05-06 09:45:23 +01:00
jacobtoppm
722d8836a9 Remove explicit height from comment-list to stop overflow on short pages 2021-05-04 15:05:19 +01:00
jacobtoppm
f7bc89c03e Remove teal line under active tab and align tab and comment text better 2021-05-04 10:16:23 +01:00
Karl Hobley
d50da87cf4 Get commenting stories working again 2021-05-03 17:05:56 +01:00
Karl Hobley
b9d61ab82a Use stubs in storybook 2021-05-03 17:05:56 +01:00
Karl Hobley
d927838b6c Add crypto to storybook fallbacks 2021-05-03 17:05:56 +01:00
Karl Hobley
66ff35ea52 Installed storybook
- Run `npx -p @storybook/cli sb init --type react --builder webpack5`
- Moved .storybook and stories folders into client
- Run `npm i --save-dev html-webpack-plugin@latest` to workaround https://github.com/storybookjs/storybook/issues/13332
- Add storybook-static to .gitignore
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
Jacob Topp-Mugglestone
c652e67c5e
Feature/commenting streamfield hover fix (#7131)
* Fix streamfield comment buttons not showing on hover

* Fix hover colour change only happening for some comment buttons
2021-04-28 16:21:16 +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
Simon Evans
6c065fad8b Make comment buttons focusable 2021-04-21 14:51:31 +01:00
jacobtoppm
1ff4bdceef Alter the date format on comments to match Wagtail listings 2021-04-21 13:39:05 +01:00
Karl Hobley
dff6942a48 Improved layout of profile picture panel 2021-04-20 18:43:22 +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
485a248af8 Correctly show comment icons on hover 2021-04-20 18:25:30 +01:00
jacobtoppm
d72cb62a76 Prevent logout button hiding 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