Wykres commitów

60 Commity (3b8e15561d54da78d281f6a076bee191cd2060e8)

Autor SHA1 Wiadomość Data
LB Johnston ae89829661 Deprecate & rework imports for `window.buildExpandingFormset`
- window.buildExpandingFormset and using the base class `ExpandingFormset` can now be deprecated.
- Move the window global setting to core.js which avoids the need to add the import in editor_js, to align with other future deprecations in core.js
- Add upgrade considerations in release notes
- `ExpandingFormset` is still needed for other existing usage (InlinePanel/MultipleChooserPanel)
- Add additional JSDoc and updates to Eslint to advise developers that this feature is not to be used for new code
2024-12-10 01:42:32 +00:00
LB Johnston 6bc9b0ea40 Adopt Stimulus `w-formset` attributes in Group edit/create view
- Use the Wagtail admin formset mixin to adopt new data attributes on core form parts
- Update the edit/create templates to put the attributes on the remaining elements
- Add basic unit tests for smoke testing data attributes
- Remove CSP incompatible inline scripts approach
- Remove the now unused standalone static build/imports for the group edit view as this will not be needed
- Update Eslint accordingly
2024-12-10 01:42:32 +00:00
LB 3697ee1f2a Eslint - fix location of storybook folder & remove eslint ignore 2024-11-20 07:52:43 +10:00
advik 0294dd1dd1 Changed Button to Link, and removed unnecessary props
- React Button was only ever used to render a link (a element)
- This creates a potential accessibility issue if developers want to render a button, it's confusing and incorrect
- Additionally, the unused prop (dialogTrigger) & aria-haspopup is non-compliant and has been removed
2024-02-05 20:07:40 +10:00
LB Johnston 825f2829a1 Update Eslint rules - remove items no longer required 2024-02-03 10:29:04 +10:00
Karthik Ayangar 41d40f5c37 Adjust Eslint rules for TypeScript files (no-shadow)
Signed-off-by: Karthik Ayangar <karthik.ayangar7118@gmail.com>
2024-02-03 07:35:09 +10:00
LB Johnston f029e46f5e Documentation - Refactor promotion banner without jQuery
- Use HTML template in layout for content
- Use non-jQuery JS
- Ensure that the cookie has the sameSite value set correctly
- Set closed cookie duration to 90 days (instead of 30)
- Add upcoming Wagtail Space events 2024 & adjust styles to suit two links
2024-01-31 12:24:46 +10:00
Thibaud Colas 91aa28b11a Add new dropdown-button component 2024-01-17 16:39:30 +00:00
Thibaud Colas b7d2618d93
Remove Safari 14 support in Wagtail admin – update browserslist and TypeScript (#11258)
Co-authored-by: Sage Abdullah <sage.abdullah@torchbox.com>
2023-12-12 10:54:41 +00:00
Matt Westcott 5f41356dbe Remove modeladmin references from transifex config and eslintrc 2023-11-02 17:04:48 +00:00
LB Johnston a008554b9c Move chooser views from search into searchpromotions 2023-10-09 20:56:09 +11:00
LB Johnston bd730ecba6 Eslint - allow `new SomeClass()` in unit tests
- This constraint is not required in unit tests where the output of a class is not the main thing being tested
- Avoid noise in tests by just removing disabling this linting rule in these files
2023-10-06 20:36:42 +11:00
LB Johnston 1a95163138 Update eslint configs & align linting changes
- Align JS with latest Eslint package updates
- Update configs to ignore new defaults not required in test files
- Update Controller js usage & configs for classProperty naming rules
- Remove eslint ignore directives no longer required due to changed defaults
2023-08-02 21:00:25 +10:00
LB Johnston 35de8a98b7 Progress Controller - add backwards compatible cancelSpinner
- support legacy cancelSpinner global for any other code that may still rely on this
- see #10498
2023-06-13 12:59:45 +01:00
Aadi jindal ed58c692ca Allow Action controller to trigger a redirect
- Migrate site switcher to use Stimulus approach via w-action
- Closes #10035
2023-04-18 08:30:22 +10:00
4the4ryushin eb5bb5a9c8 Migrate `window.addMessage` to a Stimulus Controller `w-message`
- Introduce a new controller `MessagesController` to contain the dynamic updating of messages
- Ensure the document updated label does not repeat every time a document is updated
- Using the Stimulus controller with templates approach, icons can easily be pre-loaded for each message type
- Ensure that messages are consistently cleared when new ones are added (this was done ad-hoc across some usage and not others)
- Fixes #9493
2023-03-08 21:35:34 +10:00
Lovelyfin00 554311752b Eslint - Removed legacyCode rules
- Fix any issues in files being ignored
- Fixed linting errors where appropriate
- Include some rules being ignored in the src/components folder
- Closes #8731
2023-01-11 22:55:06 +10:00
LB Johnston ede189ada5 Set up initial stimulus application integration 2022-12-19 14:00:11 +00:00
Lovelyfin00 5728b876e0 Update Eslint config
- Legacy code ignoring no longer needed for some rules
2022-12-11 15:32:47 +10:00
LB Johnston 734932c0c4 eslint - add fix for linting error in utils/action
- prefer-default-last was the only issue which is easily fixed in utils/action
- move global ignoring of utils folder
- add basic unit tests for actions.ts
2022-12-10 07:05:39 +10:00
LB (Ben Johnston) 4e66afad0a
Eslint - disable rule class-methods-use-this (#9482) 2022-12-09 07:33:28 +00:00
LB (Ben Johnston) a3fa3b86be
Eslint - disable rule max-classes-per-file (#9483) 2022-12-09 07:14:49 +00:00
Lovelyfin00 731f96e9a8 Removed no plus plus eslint rule and fixed errors from linting
- Relates to #8731
2022-11-23 07:39:35 +10:00
Lovelyfin00 933a730928 Removed no-prototype-builtins rule from eslintrc and fixed minor additional issues 2022-11-10 06:40:40 +10:00
LB Johnston cad419ea9e Prettier linting - clean up ignored file (search promotions)
- remove specific file in .prettierignore and add inline comments to allow for linting / formatting for the searchpromotions_formset
- Split from #9522
2022-11-07 19:34:57 +10:00
LB Johnston 8037de631f eslint config - only list explicit files that need to be included with legacy config 2022-09-27 14:53:18 +01:00
LB Johnston eb398a5f9b eslint - move 'prefer-destructuring' disabling to core rules
- this rule does not align with preferred code approach
2022-09-27 14:53:18 +01:00
LB Johnston 458b77e5ae eslint config - remove rules no longer needed
- no-await-in-loop can be removed from legacyCode (expect api page chooser, ignored in-line)
- prefer-promise-reject-errors can be removed as it is no longer used in any code (except mock-fetch, ignored in line)
2022-09-27 14:53:18 +01:00
LB Johnston d57021e1cc clean up eslint for test files
- disable general rules to make writing tests simpler
2022-07-06 19:28:25 +10:00
LB Johnston 0dfa39d3c5 eslint - remove react/jsx-no-useless-fragment ignoring & fix 2022-07-06 19:21:35 +10:00
LB Johnston f6107166ed eslint - remove react/jsx-filename-extension ignoring as already set up in global 2022-07-06 19:21:35 +10:00
LB Johnston 441a32fb22 eslint - remove react/jsx-curly-brace-presence ignoring & format 2022-07-06 19:21:35 +10:00
LB Johnston 14c4bcff68 eslint - remove anchor-is-valid ignoring & fix 2022-07-06 19:21:35 +10:00
LB Johnston 8e13985bc0 eslint - remove jsx-a11y/alt-text ignoring & fix 2022-07-06 19:21:35 +10:00
LB Johnston 3bd71ec03c eslint config - move react specific legacy ignoring to separate section 2022-07-06 19:21:35 +10:00
LB Johnston f252aa83d1 eslint - remove prefer-object-pread ignoring & format/fix 2022-06-24 11:17:04 +01:00
LB Johnston ecf99931d9 eslint - remove no-import-assign (had no issues) 2022-06-24 08:25:02 +10:00
LB Johnston 5ba404704b eslint - remove operator-assignment & format 2022-06-24 08:25:02 +10:00
LB Johnston a0c769b845 eslint - remove no-extra-boolean-cast & format 2022-06-24 08:25:02 +10:00
LB Johnston 0c3c8ae49b eslint - remove 'no-lonely-if' & format 2022-06-24 08:25:02 +10:00
LB Johnston 75d2f063a2 eslint - update lines-between-class-members & format
- allow single line members to be compact
2022-06-24 08:25:02 +10:00
LB Johnston f10eb48ae3 eslint - remove import/no-cycle as not needed 2022-06-23 13:42:28 +01:00
LB Johnston 9f7c023c12 eslint - remove import/no-extraneous-dependencies & add ignore
- ignoring in one location where import is added for dev only
2022-06-23 13:41:59 +01:00
LB Johnston 6995ba4aee eslint - move import/first & fix
- import/first is useful in tests when we need to set up globals before importing (jquery)
2022-06-23 13:35:09 +01:00
LB Johnston 6fd77175aa eslint - remove import/no-useless-path-segments & format 2022-06-23 13:35:09 +01:00
LB Johnston e0b6d54e25 eslint - remove import/order & format 2022-06-23 13:35:09 +01:00
LB Johnston 20a75b2a90 eslint - remove rule import/newline-after-import & format
- relates to #8731
2022-06-23 13:35:09 +01:00
LB (Ben Johnston) b25b343225
Fix ESLint issue with how jQuery is treated as a core module (#8591) 2022-06-01 07:51:35 +01:00
LB (Ben Johnston) 9a04aefe9a
Disable ESLint prefer-default-export globally (#8577)
- default / named exports are used in varying places and it is not a critical blocker for future code
- disable this rule and in the future it can be re-assessed or moved to the core wagtail eslint config
2022-05-31 22:47:50 +01:00
Matt Westcott 6b30a1aae9 Use SearchController on task chooser modal 2022-05-25 19:00:50 +10:00