0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00
Commit Graph

1661 Commits

Author SHA1 Message Date
Matt Westcott
9b74c83195
Eliminate jQuery from telepath widget classes 2024-04-17 14:49:11 +07:00
Sage Abdullah
bb12877f79
Use tables component in users index view
This also allows us to reuse the "..." more button for each listing item
instead of the inline buttons.
2024-04-09 08:54:48 +07:00
Neeraj P Yetheendran
568611fe35 Remove non-Stimulus usage of Mousetrap
- No longer need page-editor.js (move the window. global to core.js instead)
2024-04-07 21:05:28 +10:00
Neeraj P Yetheendran
63f7e336db Create new Stimulus KeyboardController (w-kbd) 2024-04-07 21:05:28 +10:00
divdeploy
91cd6cffc2 chore: fix some comments
Signed-off-by: divdeploy <chenguangxue@outlook.com>
2024-04-07 15:59:37 +10:00
Sage Abdullah
0006976267 Implement universal listings UI for form submissions listing view 2024-04-05 17:36:41 +01:00
Karthik Ayangar
452d9aaa42 Remove initBlockWidget global window function 2024-04-04 08:28:17 +10:00
Karthik Ayangar
d2405eefe8 Add Stimulus BlockController 2024-04-04 08:28:17 +10:00
Sage Abdullah
c8686cc7e9
Apply suggestions from code review 2024-04-02 16:40:27 +07:00
LB Johnston
e71e947046
Add base styling for footer actions to support simple customisations
- Fixes #11629
- Relates to clean up done as part of #11629 which removed a lot of styling for footer actions which appeared to be unused.
- Re-add some base styling to support the ability for basic customisations where buttons are added within the `extra_footer_actions` block.
2024-04-02 12:29:24 +07:00
osafalisayed
cd93a9c98d Updated dynamic sidebar Wagtail logo
- Relates to #10404
- See original PR #10659
2024-03-23 19:48:31 +10:00
LB Johnston
5fd8ebf171 SwapController - Ensure untrusted data sources are logged correctly
Avoids the rare case of `requestUrl` being used to log out an object
Fixes #11212
2024-03-23 18:17:53 +10:00
LB Johnston
da212ce53e Add support for groups within BulkController toggles
- Allows one controlled w-bulk element to contain groups of toggles that work together
- Useful for tables where the DOM structure means that columns will need to be toggled / selected as one
- Basic support for 'multi' groups to avoid issues with space separated items
2024-03-23 14:21:19 +10:00
LB Johnston
0f44abeef2 Minimap - Ensure that we correctly handle not found matched elements
- Currently the code appears to try to fallback to an empty id, however this will never happen as we are building a non-empty string
- Instead if we have not found any closest panel, simply return the intersection map as is
Closes #11210
2024-03-22 17:35:19 +10:00
LB Johnston
9084c196fa Fix minor typo in CountController JSDoc 2024-03-17 21:52:33 +10:00
Karthik Ayangar
bb5b253ef1 Add basic keyboard shortcuts dialog
Include the ability to trigger the dialog from the sidebar
Include base styling and unit tests
Fixes ##11711
Relates to larger work for keyboard shortcuts in #3949
2024-03-16 16:59:26 +10:00
Chiemezuo
aebdf82387 Ensure that dropdown content will be scrollable if content is too high
Fixes #11108
2024-03-14 07:28:27 +10:00
Sage Abdullah
88fad9a071
Show full label for non-page listings HeaderButton
In the new designs, listings other than the page listings should show
the complete label for the main header button.

The page listing only shows the icon because much of the space is taken
by the side panel toggles.

The page listing's header button hasn't been refactored to use the
HeaderButton class, hence there is no changes to the page listings code
in this commit.
2024-03-11 09:55:41 +00:00
Sage Abdullah
420723c174
Move 'sort by' select element in images listing to the slim header
This uses a custom header template that extends the slim_header.html

We could do this without the custom header template, but this would mean
the slim_header.html will accept yet another variable (extra_form_fields),
which we are trying to avoid to prevent it from accepting so many variables
like header.html.

This is especially since this "extra fields" block is only needed for the
images listing (at least for the foreseeable future).
2024-03-11 09:55:41 +00:00
Sage Abdullah
2003e14a95 Allow TeleportController to have any number of child nodes of any kind 2024-03-09 20:15:03 +10:00
Karthik Ayangar
00474a6152 fix: MutationObserver in dirty form check only tests direct descendants
Fixes #11142
2024-03-07 08:09:37 +10:00
Sage Abdullah
24deedea78 Add icon support to generic breadcrumbs template tag 2024-03-05 09:56:47 +00:00
Sage Abdullah
a106a3e805 Remove extraneous padding in chooser modal listings
Fixes #11704
2024-03-05 18:09:16 +10:00
LB Johnston
07d6acfb52
Fix - Ensure that modal tabs width are not impacted by side panel opening
Regression from #11150
2024-02-29 11:37:53 +00:00
Chiemezuo
9ae45aab50 Add ability for Draftail to be initialized via a dispatched CustomEvent 2024-02-29 08:15:15 +10:00
Chiemezuo
514a0aab9f Update InitController to support dispatching detail
- Update JSDoc throughout controller for better internal documentation
- Ensure we 'clean up' the other controller attributes when the init has completed
- Allow for the ready event to have the preventDefault called and stop other events from dispatching
- Add unit tests to support the above changes
2024-02-29 08:15:15 +10:00
elhussein almasri
da88ec81f1 Adopt entity chooserUrls for Draftail richtext links
Avoid the need to load window.chooserUrls globally in the shared _editor_js.html include.

Instead pass in the lazy URLs to the link chooser entity options.
2024-02-28 21:36:49 +10:00
elhussein almasri
69e32660db Add support for Draftail ModalWorkflow JS to use chooserUrls supplied
Instead of relying on global window.chooserUrls, add the support for also passing in entityType config objects that serve the same purpose.

Update JS unit tests to reflect that the future will no longer support the window.chooserUrls
2024-02-28 21:36:49 +10:00
Sage Abdullah
2594be387d Add tests for w-dropdown-keep-mounted-value 2024-02-27 09:43:14 +00:00
Sage Abdullah
71a8853365 Add tests for w-link 2024-02-27 09:43:14 +00:00
Sage Abdullah
1b3e54e267 Add tests for w-teleport-reset-value 2024-02-27 09:43:14 +00:00
Viktor Szépe
5679b30d1b
Fix typos (#11687) 2024-02-22 17:39:16 +00:00
LB Johnston
ba516ef492 a11y results - coerce CrossTreeSelector into a string
- Ensures that TypeScript will allow these values to be passed into querySelector
2024-02-20 16:54:35 +00:00
Thibaud Colas
a17996073e
Make sure all custom widgets within drilldown dropdowns use the expected text color 2024-02-15 10:01:48 +00:00
Thibaud Colas
56f9855c07
Ensure BooleanRadioSelect uses the same styles as RadioSelect 2024-02-15 10:01:48 +00:00
Thibaud Colas
e9727eacaf Code refactorings based on code review feedback 2024-02-14 15:04:17 +00:00
Thibaud Colas
4ec22a4b62 Refactor helper methods for fetch response mocking 2024-02-14 15:04:17 +00:00
Sage Abdullah
88bdd397cf Use w-swap's reflect event in w-drilldown and w-link 2024-02-14 15:04:17 +00:00
Sage Abdullah
4fedf3e2d4 Add the ability to reflect query params in SwapController
This is useful when the controller is used in views that would produce an identical response if the page is hard-reloaded with the same params, e.g. listings
2024-02-14 15:04:17 +00:00
Adrien Hamraoui
58ebfe1fb1 fix: InlinePanel - take 1st child when configuring up and down js events
Issue was appearing when there was nested inline panels.
currentChild. find would match the parent up/down button
but also all the ones of the nested inline panels
Fixes #5919
2024-02-13 07:45:06 +10:00
LB Johnston
d06b04c8bd Update Eslint, Prettier, Stylelint packages & pre-commit versions
This un-reverts commit 99dd11510b with fixes for Prettier mirror (it's rev must be 3.0.3 even if using a newer Prettier).
The original commit which was reverted is 5971ce7f3f
2024-02-08 15:23:48 +00:00
Matt Westcott
99dd11510b Revert "Update Eslint, Prettier, Stylelint packages & pre-commit versions"
This reverts commit 5971ce7f3f.
2024-02-07 17:12:56 +00:00
LB Johnston
5971ce7f3f Update Eslint, Prettier, Stylelint packages & pre-commit versions 2024-02-07 16:07:50 +00:00
Thibaud Colas
fc3f945781
Styling fixes for universal listings (#11608) 2024-02-07 10:44:56 +00: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
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
Sage Abdullah
a3cb4a6903 Fix filters from being removed when searching
Tippy unmounts its popper element from the DOM on hide, which means that
the filter fields get detached from the form. As a result, when
performing a search (which means the filters popup is closed), any
filters that have been applied will be lost. The issue does not occur
the other way around (filtering after search) because the filter fields
will still be in the DOM (as the popup is open while you're applying the
filters).

Unfortunately, Tippy does not offer a built-in option to keep the popper
mounted in the DOM when it's hidden.

As a workaround, use Tippy's hooks to re-append the popper to the DOM.
- onCreate: ensure the popper element is mounted even when the tippy was
  just created (normally it's only mounted when shown). This is useful
  to keep the filters when searching after a full-page refresh (e.g.
  after navigating to the next page in pagination).
- onHidden: ensure the popper is still mounted, to solve the main issue
- onShow: remove the hidden attribute and let tippy move the popper
  element as necessary (though usually this isn't necessary, because we
  remount it in the same position (the controller's element).

The 'hidden' attribute shouldn't cause any issues here as Tippy doesn't
use it. Without it, the solution still works because Tippy uses CSS to
make the element invisible. However, the complete CSS doesn't get
applied until the tippy is shown at least once. This means on initial
load with the onCreate hook, the tippy will take up the space while
being invisible. Using the attribute fixes it (and display:none probably
would too).

This behaviour can be enabled using the newly-added DropdownController
value 'keepMounted'.
2024-01-26 17:16:51 +00:00
Sage Abdullah
6991c1f2d9 Move Tippy hooks to separate arrow function declarations 2024-01-26 17:16:51 +00:00
Sage Abdullah
ea288448cd Use arrow function for hideTooltipOnClickAway to allow 'this' to refer to DropdownController 2024-01-26 17:16:51 +00:00
Sage Abdullah
a89812f6b9 Move DropdownController themeOptions to an instance property 2024-01-26 17:16:51 +00:00