0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-24 10:58:52 +01:00
Commit Graph

124 Commits

Author SHA1 Message Date
Thibaud Colas
44fd1852ee Trial browser tests in CircleCI 2022-01-15 21:44:36 +10:00
Thibaud Colas
cc90ec62b7
Add missing browserslist update for #7858 2022-01-14 10:13:25 +00:00
LB Johnston
5e321ac065 update eslint config & add fix script to package.json 2022-01-13 07:50:24 +00:00
LB (Ben Johnston)
b6d0f9cdc6
update stylelint & config-stylelint-wagtail (#7464)
Co-authored-by: LB Johnston <lb.johnston@virginaustralia.com>
2021-12-16 21:10:18 +00:00
dependabot[bot]
ba4f7c87f9 Bump immer from 9.0.1 to 9.0.6
Bumps [immer](https://github.com/immerjs/immer) from 9.0.1 to 9.0.6.
- [Release notes](https://github.com/immerjs/immer/releases)
- [Commits](https://github.com/immerjs/immer/compare/v9.0.1...v9.0.6)

---
updated-dependencies:
- dependency-name: immer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-01 07:45:54 +10:00
Matt Westcott
3635ad8280 Upgrade jest / jsdom
typed table block uses replaceChildren, which was added to jsdom in 16.6.0
2021-10-15 14:20:56 +01:00
Fabien Le Frapper
50f55507d8 Upgrade modernizr and jquery
- https://blog.jquery.com/2021/03/02/jquery-3-6-0-released/
- https://github.com/Modernizr/Modernizr/compare/v2.6.2...v2.8.3
2021-10-10 13:01:53 +10:00
LB Johnston
3e2012373a update documentation & 2.15 release to drop IE11 support
- update browserslist
- fixes #6170
2021-10-04 12:35:58 +01:00
LB Johnston
277e5481e7 update node requirements to node v14
- fixes #7473
2021-08-31 11:11:26 +10:00
Storm Heg
952264a2ab
Slim sidebar: remember collapsed state 2021-07-23 10:47:50 +01:00
Karl Hobley
437a098ece Update ts-loader to 9.1.1
Current version is incompatibile with our version of Webpack.

Fixes #7153
2021-05-04 14:48:56 +01:00
Karl Hobley
b9d61ab82a Use stubs in storybook 2021-05-03 17:05:56 +01:00
Karl Hobley
325587c3d2 Update to a pre-release of Storybook 6.3
https://stackoverflow.com/questions/67070802/webpack-5-and-storybook
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
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
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
Jacob Topp-Mugglestone
d64dad9739 Add save warning to page editor for comments and edits 2021-04-20 18:25:30 +01:00
Karl Hobley
bbbc31ff60 Merge Wagtail Comment Frontend (#6953)
* Copy code from wagtail-comment-frontend

Exact copy of the src directory from:
4486c2fc32

* Integrate commenting code

* Linting
2021-04-20 18:25:30 +01:00
Karl Hobley
bd606ab15c Assign new block id on insert 2021-04-20 18:25:30 +01:00
jacobtoppm
4aa2753762 Install redux types 2021-04-20 18:25:30 +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
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
Matt Westcott
10d106ab43 Upgrade telepath to 0.0.3 for ES5 compatibility 2021-04-14 20:58:40 +01:00
Karl Hobley
47b9c040ec Update React Redux to 7.2.2 2021-03-19 17:10:57 +00:00
Karl Hobley
7b0d671100 Update React to 16.14 2021-03-19 14:01:50 +00:00
Matt Westcott
30fee96d37 update telepath-unpack to 0.0.2 to fix module imports 2021-03-17 23:32:57 +00:00
Matt Westcott
31a6e5b0a8 Move telepath.js into an external package 2021-03-17 23:32:56 +00:00
Karl Hobley
caf8a7f2d7 Import SCSS from react-streamfield 2021-03-17 23:32:54 +00:00
Karl Hobley
2ba9619ed2 Linting telepath JS 2021-03-17 23:32:19 +00:00
Thibaud Colas
fd563b6adf
Use TypeScript configuration for all JS linting (#6862)
- Switches our JS linting to be done with the TypeScript parser, and TypeScript rules. They handle JavaScript as well, and using the same parser everywhere matches how our build tools work. Additionally I had to disable a few rules for test files and webpack.config.js.
- Adds --report-unused-disable-directives to our linting script, and removes the unused directives.
2021-03-05 16:54:11 +00:00
Joshua Marantz
8e79c61564
Implement CSS variables for admin color theming (#6409)
Co-authored-by: JNaftali <jmarantz@thelabnyc.com>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-01-17 02:17:41 +00:00
Karl Hobley
773de3eded Update webpack to version 5 2021-01-15 17:13:39 +00:00
Karl Hobley
9873c23e3c Manually fix/ignore remaining legacy JS linting issues 2020-12-22 23:39:24 +00:00
Karl Hobley
650045b573 Convert Explorer into TypeScript
And replace PropTypes with TypeScript annotations
2020-10-21 23:33:51 +10:00
Thibaud Colas
d316677b89 Switch from Babel to TypeScript 2020-10-21 12:48:40 +01:00
Thibaud Colas
e2bfeb1e20 Fix remaining reported vulnerabilities 2020-10-21 12:33:25 +01:00
Thibaud Colas
5392891c5a Upgrade to latest @wagtail/stylelint-config-wagtail to remove peerDependency warning 2020-10-21 12:33:25 +01:00
Thibaud Colas
582b9c61fd Replace gulp-cssnano and gulp-autoprefixer with gulp-postcss and respective packages 2020-10-21 12:33:25 +01:00
Thibaud Colas
d0dd6820c9 Update Webpack 2020-10-21 12:33:25 +01:00
Karl Hobley
3e158ca2aa
Enable TypeScript (#6472)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-10-21 00:51:09 +01:00
Karl Hobley
0c2bae7941
Update to Babel 7 (#6471)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-10-20 17:06:52 +01:00
Thibaud Colas
100edcdc09 Update npm dependencies with npm audit fix
Apply trickier gulp upgrades

Update react-streamfield, removing extraneous dependency

Upgrade to latest version of stylelint

Add package-lock.json changes from local npm install
2020-06-04 07:02:43 +10:00
Thibaud Colas
314a926f75 Update Python and JS test coverage collection to exclude tests 2020-05-27 09:11:26 +01:00
Thibaud Colas
7eeb44ad04 Replace gulp-sass with gulp-dart-sass
* Rewrite Sass code that relies on deprecated or removed features in Dart Sass
* Remove unneeded rebuild of node-sass
* Update lockfile
2020-05-17 21:00:20 +10:00
Thibaud Colas
471823f238 Upgrade to Jest 23
* Jest 24 is out but upgrading to it would require us to also update our Webpack tooling to Babel 7, which is quite significant work.
* Rewrite Draftail initialisation tests to stop relying on jsdom script parsing
2020-05-17 20:35:00 +10:00
Jim Jazwiecki
6ea0cc52f3 Upgrade to Gulp v4 & Node 10
* Syntax changes to get Gulp working
* Require Node 10, use node 10 in CircleCI and squash.yml
* Update docs
* resolves #5653
2020-05-01 12:01:03 +10:00
dependabot[bot]
01caaa0dc2 Bump eslint from 2.13.1 to 4.18.2 (#5665)
* Bump eslint from 2.13.1 to 4.18.2

Bumps [eslint](https://github.com/eslint/eslint) from 2.13.1 to 4.18.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v2.13.1...v4.18.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix up linting issues
2019-11-06 18:16:10 +00:00
Bertrand Bordage
1a4c157ec8 Updates to react-streamfield 0.9.5. 2019-08-23 14:55:27 +01:00
Matt Westcott
725b01c809 Replace streamfield CSS with react-streamfield CSS 2019-08-23 14:55:26 +01:00
LB Johnston
bbbb70ae65 Remove explicit stylelint-scss requirement & upgrade config pkg to v0.1.0 2019-05-20 16:42:35 +01:00