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

70 Commits

Author SHA1 Message Date
dependabot[bot]
75fb953754 Bump @babel/traverse from 7.17.3 to 7.23.2 in /client/tests/integration
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.17.3 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 08:50:47 +11:00
LB Johnston
51353c7c43
Do not use jest inside stubs.js to prevent Storybook from crashing 2023-09-13 15:04:04 +01:00
dependabot[bot]
f66cb7cbb5 Bump word-wrap from 1.2.3 to 1.2.4 in /client/tests/integration
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 18:07:56 +10:00
dependabot[bot]
d886e5eadb Bump tough-cookie from 4.0.0 to 4.1.3 in /client/tests/integration
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 18:07:49 +10:00
LB Johnston
f90e03ab35 Update Jest to v29, uuid v9 & update stubs
- `uuid` update is required to avoid import errors - https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
- Add stubs for window.scrollTo to avoid console errors when running tests
- Filter out warnings for Draftail React warnings, these are unlikely to be resolved anytime soon and add noise to the Jests tests that are unhelpful
- Closes #10043
2023-07-13 07:51:26 +01:00
Thibaud Colas
a517ee6dc9 Fix Storybook stories intialisation broken due to script config dependencies 2023-02-15 22:52:49 +10:00
Matt Westcott
947a7883f9 Add a higher-level API for chooser modals
Previously, anything invoking the chooser modal needed to make its own call to ModalWorkflow, which meant it needed to import the corresponding 'onloadHandlers' dict, know the appropriate chosen response identifier to listen to, and know how to modify the chooser URL to pass parameters (if applicable). This would mean a lot of duplicated logic if there were multiple places where the modal is invoked.

Here we introduce a ChooserModal base class which encapsulates those details - a caller just needs to instantiate it with the base URL, and call `open` on it to open the modal (passing an options dict and a response callback).
2023-01-18 14:31:07 +00:00
Lovelyfin00
004faac53c
Migrate workflow and workflow tasks enable action to a Stimulus controller (#9844)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-12 21:55:40 +00:00
dependabot[bot]
e04dd2cb1a Bump json5 from 2.2.0 to 2.2.3 in /client/tests/integration
Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 12:04:42 +00:00
dependabot[bot]
ccf6ec15f7 Bump minimatch from 3.0.4 to 3.1.2 in /client/tests/integration
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 07:57:41 +10:00
Joshua Munn
78fe000b19 Add custom jest matcher for block id duplicate tests 2022-09-06 08:08:34 +10:00
Mehrdad Moradizadeh
a0f038af14 move branding_title to the end of page title
Ensure the title of the Web page first identifies the topic of the page, then shows the group name followed by the name of the parent organisation.
* fixes #9054
* https://www.w3.org/WAI/WCAG21/Techniques/general/G88
* https://www.w3.org/WAI/WCAG21/Understanding/page-titled.html
2022-08-31 22:10:57 +10:00
Thibaud Colas
eac5e0bc2c Finish re-implementing form styles based on design feedback & code review
Co-authored-by: LB Johnston <mail@lb.ee>
2022-08-05 10:36:52 +02:00
Thibaud Colas
405af5d451 Skip two Axe tests currently timing out 2022-08-04 06:48:41 +10:00
LB (Ben Johnston)
7c9b6fd415
Cleanup - eslint config fixes (#8543)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 16:08:13 +01:00
Thibaud Colas
d4f6e81067 Fix last integration test failure 2022-04-29 14:43:45 +01:00
Steve Stein
bb083e4463
Status sidebar design review and fixes (#8445)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-29 14:38:53 +01:00
Steve Stein
8bbf41627b
Implement new slim page editor header with breadcrumb (#8231)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Co-authored-by: Dan Braghis <dan@zerolab.org>
Co-authored-by: Karl Hobley <karl@kaed.uk>
2022-04-08 17:36:47 +01:00
dependabot[bot]
79ad6b65c1 Bump minimist from 1.2.5 to 1.2.6 in /client/tests/integration
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 06:49:08 +10:00
Karl Hobley
849ac514a2 Define gettext functions in an importable module 2022-04-01 17:01:26 -04:00
Karl Hobley
1e884285a1 Replace STRINGS constants with gettext 2022-04-01 17:01:26 -04:00
LB (Ben Johnston)
042d077fc1
Minor accessibility fixes to new slim sidebar menu items (#8015)
* Consistently set `aria-haspopup="menu"` for all sidebar menu items that have sub-menus (LB (Ben Johnston))
 * Make sure `aria-expanded` is always explicitly set as a string in sidebar (LB (Ben Johnston))
 * Use a button element instead of a link for page explorer menu item, for the correct semantics and behavior (LB (Ben Johnston))
2022-03-15 14:53:40 +00:00
LB Johnston
e20f3f6966 test integration - update packages
- puppeteer - v11 to v13 https://github.com/puppeteer/puppeteer/releases/tag/v12.0.0 & https://github.com/puppeteer/puppeteer/releases/tag/v13.0.0
- @wordpress/jest-puppeteer-axe" - v3 to v4 42a5611fa7/packages/jest-puppeteer-axe/CHANGELOG.md (400-2022-01-27)
- jest & expect-puppeteer - minor update
2022-03-01 22:54:12 +00:00
LB Johnston
51ba6e4c47 integration tests - update package-lock for Node v16 usage 2022-03-01 22:54:12 +00:00
Thibaud Colas
d2d4651853 Remove polyfills only installed for IE11 2022-02-15 16:31:57 +00:00
Thibaud Colas
af942a27e4
Reformat codebase with Prettier (#7912)
- Automated reformatting
- Manually change code where Prettier reformatting causes issues
- Revert "Disable Prettier formatting in CI for now"
2022-02-04 11:57:55 +00:00
Thibaud Colas
81ec3244d3 Upgrade ESLint configuration, with needed refactorings
- Change ESLint configuration syntax for ease of editing
- Autofix basic issues picked up by ESLint
- Make sure JS linting runs on TypeScript files
2022-02-01 07:36:17 +10:00
Thibaud Colas
1c2ef89957 Support changing which origin the integration tests are run on 2022-01-15 21:44:36 +10:00
Thibaud Colas
7630bcf231 Fix package-lock.json package name 2022-01-15 21:44:36 +10:00
Thibaud Colas
60fe493999 Skip editbird tests 2022-01-15 21:44:36 +10:00
Thibaud Colas
44fd1852ee Trial browser tests in CircleCI 2022-01-15 21:44:36 +10:00
Thibaud Colas
7c4b82bb8e Add ARIA markup for sidebar regions and toggle buttons 2022-01-12 16:46:08 +00:00
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