- Install Prettier
- Add Prettier configuration
- Add git-blame-ignore-revs
- Clean up .editorconfig indent_style definition
- Clean up .editorconfig space definitions
- Add documentation for Prettier
- Add missing Prettier run-scripts
- Disable Prettier formatting in CI for now
- Remove gulp code and docs
- Add base CSS & SCSS processing in Webpack
- Make sure Sass files use paths that can be resolved by Webpack
- Use faster source map generation
- Clean up build scripts
- Make sure Storybook can process Sass
- Switch away from web fonts (more work needed)
- 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
* 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
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>
* 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
- 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.
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
* 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
* Upgrade gulp-sass to 4.0.1 and rebuild package-lock.json with npm 6
The only difference to the generated code appears to be in sourcemap data.
* Run npm audit to fix most vulnerable packages
Generated static files are unchanged by this update.
* Revert package-lock.json to npm 5 format
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