0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 01:22:07 +01:00
wagtail/client
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
..
scss Add base Axe accessibility checker integration within userbar, with error count (#9850) 2023-01-12 12:21:58 +00:00
src Add a higher-level API for chooser modals 2023-01-18 14:31:07 +00:00
storybook Set up initial stimulus application integration 2022-12-19 14:00:11 +00:00
tests Add a higher-level API for chooser modals 2023-01-18 14:31:07 +00:00
extract-translatable-strings.js Ignore test files from extract-translatable-strings 2022-11-07 19:51:13 +10:00
package-lock.json Feature/field comment frontend (#6530) 2021-04-20 18:25:30 +01:00
README.md auto-format core markdown files (#8603) 2022-06-01 23:08:56 +10:00
tailwind.config.js Refactor Wagtail userbar as a web component (#9816) 2022-12-27 16:55:19 +00:00
webpack.config.js Migrate lock/unlock actions to w-action controller 2023-01-18 19:00:47 +10:00

Wagtail client-side components

This library aims to give developers the ability to subclass and configure Wagtail's UI components.

Usage

npm install wagtail
import { Explorer } from 'wagtail';
// [...]
<Explorer />;

Development

# From the project root, start the webpack + styles compilation.
npm run start

You will also need:

Releases

The front-end is bundled at the same time as the Wagtail project. This package also aims to be available separately on npm as wagtail.