Wykres commitów

564 Commity (83f00a836384c90d34effd64efece411d36dc85d)

Autor SHA1 Wiadomość Data
Sage Abdullah e6bcfb710b Remove focus-visible fallback in preview panel code
We're dropping support for Safari 15 soon
2024-09-19 08:22:54 +10:00
Sage Abdullah 8d6d772da0 Final clean up of PreviewController and usage
Move all bind() to connect()

Add renderUrl value to use different URLs for sending vs rendering preview data

Add docstrings for PreviewController properties

Rename cleared property to ready and dispatch w-preview:ready

Add events to PreviewController update lifecycle

Use zero interval delay to disable preview auto update

Rearrange PreviewController methods to better follow the update flow

Ensure only one preview iframe has the w-preview-iframe ID at a given time

This doesn't really affect how it functions, but it's semantically more correct

Ensure runContentChecks function does not crash in tests

Only clear stale data if there is a valid stale preview available

Fix preview on Firefox by not removing the only iframe

Reorder targets and values alphabetically and add JSDoc for events

Introduce w-preview__proxy class for invisible elements in preview panel
2024-09-19 08:22:54 +10:00
Sage Abdullah db4e86a2c1 Rename preview-panel class to w-preview 2024-09-19 08:22:54 +10:00
Sage Abdullah 55d57be7c5 Initial migration of preview panel to Stimulus PreviewController
Initialise preview panel as a Stimulus PreviewController

Fix TypeScript issues in PreviewController

Use Stimulus targets for preview device size inputs

Use Stimulus target for preview panel new tab button

Use Stimulus target for preview panel loading spinner

Use Stimulus target for preview panel refresh button

Use Stimulus target for preview panel mode select

Use Stimulus target for preview panel iframe

Also rename the id to w-preview-iframe to follow our new conventions for
singleton elements

Rely on Stimulus to replace the iframe target

Because we copy all the attributes from the old iframe to the new one,
this means that the new iframe will also become a target. When we remove
the old iframe, the target is disconnected, and subsequent references to
this.iframeTarget should point to the new one.

Access the preview panel's parent side panel element via this.element.parentElement

Bind preview device size inputs using Stimulus data-action

Extract PreviewController.observePanelSize() method

Extract PreviewController.restoreLastSavedPreferences() method

Use Stimulus value for preview panel url

Use Stimulus value for preview panel pending update state

Move edit form and spinner timeout references into instance variables

Extract PreviewController.finishUpdate() method

Extract PreviewController.reloadIframe() method

Extract PreviewController.clearPreviewData() and setPreviewData() methods

Replace preview panel refresh button target with data-action

Extract openPreviewInNewTab method and use it via data-action

Do not close the preview tab if the data is not valid

Use Stimulus values for preview panel auto update config

Extract PreviewController.initAutoUpdate() method

Extract handlePreviewModeChange method and use it via data-action

Use Stimulus classes for preview panel unavailable and has-errors CSS classes

Use Stimulus class for preview panel selected input size

This removes the reliance of having a predefined set of classes for each
device name, making it easier to add support for custom sizes later.

The outline styles have also been updated to make use of focus-visible
when available.

Use hidden attribute for hiding preview panel spinner

Replace PreviewController isUpdating value with an updatePromise instance variable

Extract PreviewController.hasChanges() method

Extract PreviewController.checkAndUpdatePreview() method

Add default values for PreviewController values

Use ProgressController outlet for preview panel refresh button

This allows the use of the button-longrunning handling for the loading state.

Also, turn the button into an icon-only button as there might not be enough space when the panel is resized to the smallest size

Use cloneNode() instead of manually copying the attributes

Extract PreviewController.replaceIframe() and use it as the iframe's action

Extract PreviewController.sidePanelContainer instance attribute

Extract PreviewController.checksSidePanel instance attribute

Extract PreviewController.updateInterval instance attribute

Clean up PreviewController event listeners on disconnect

Extract preview panel device localStorage key into PreviewController Stimulus value

Extract preview panel's width CSS property names into Stimulus values

Disconnect preview panel ResizeObserver on controller disconnect

Use an instance variable for tracking preview availability
2024-09-19 08:22:54 +10:00
Sage Abdullah f8589b3dcd Fix text alignment of model names in object permissions section 2024-08-13 19:14:54 +01:00
Sage Abdullah aadad14ee8
Improve styles for overly long selectors in checks results 2024-07-31 11:10:49 +01:00
Thibaud Colas a684273227 Re-instate accessibility check selectors in CMS. Fix #12157 2024-07-31 10:43:07 +02:00
Sage Abdullah 8845a8091e Improve display of editing sessions on smaller screens 2024-07-19 13:14:30 +01:00
Sage Abdullah 52cf4de58c Use lighter shade of red for unsaved changes indicator in dark mode 2024-07-19 13:14:30 +01:00
Sage Abdullah 6689c2abdd Fix warning icon filler for custom font sizes 2024-07-19 13:14:30 +01:00
Sage Abdullah 2a47ad1da2 Rename w-editing-sessions__session--latest to w-editing-sessions__session--saved 2024-07-19 13:14:30 +01:00
Sage Abdullah 756913c44d Restore ping effect for session with latest revision
Was lost when refactoring the styles to a separate component because @apply doesn't work with custom classes
2024-07-19 13:14:30 +01:00
Sage Abdullah 72934a5049 Fix spacing in editing sessions dialog buttons 2024-07-19 13:14:30 +01:00
Sage Abdullah 74c0c25f74 Fill the hole in the warning icon 2024-07-19 13:14:30 +01:00
Sage Abdullah 5de63bd1b3 Use list elements for the editing sessions list 2024-07-19 13:14:30 +01:00
Sage Abdullah 57f34ac6ed Extract editing sessions styles into its own component 2024-07-19 13:14:30 +01:00
Sage Abdullah 80480d8499 Add popup theme for tippy and DropdownController 2024-07-19 13:14:30 +01:00
Sage Abdullah 5168ee0c7c Only apply hover-opacity effect to button icons inside the default 'dropdown' theme 2024-07-19 13:14:30 +01:00
Sage Abdullah f0569661a3 Add ping-critical animation and w-ping--critical class to use it 2024-07-19 13:14:30 +01:00
Sage Abdullah c3cbe81a95 Rename pulse-warning animation to ping-warning and extract to its own file
Tailwind has a similarly-named 'pulse' animation that behaves differently:
it makes the element fade in and out.

Meanwhile, it has a 'ping' animation that behaves similarly to our 'pulse'
animation: https://tailwindcss.com/docs/animation

Follow the Tailwind names to avoid confusion. In the future, we might
want to implement a similar 'pulse' animation. Or, perhaps we can reuse
Tailwind's animations as-is.
2024-07-19 13:14:30 +01:00
Albina 2508b712a9
Language label fine-tunes (#12136)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-07-19 12:48:55 +01:00
Albina 2d568dd825
Content checks design upgrade: help text and separate cards (#12090)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-07-16 22:27:27 +01:00
Albina c632832edf
Language label redesign - admin listings (#12010)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-06-26 11:18:59 +01:00
Albina 4e2afc966b
Content checks results redesign (#12019) 2024-06-17 16:25:36 +01:00
Inju Michorius ac38343957
Remove opacity property from unpublished page titles (#12043) 2024-06-13 15:24:46 +02:00
sag​e 8ddf472e93
Partially revert listing styles changes to fix layout issues (#11936) 2024-05-17 11:44:28 +01:00
Sage Abdullah 08ee15a358 Remove --inline-actions variant of listing tables
This was added in f322e9d868, when the
snippets listing view was briefly redesigned to put the "Edit", "Delete"
etc. actions in the same line as the title instead of in a new line.

With the universal listings design, all listing actions are put inside a
three-dot dropdown menu.

This style is no longer used anywhere in Wagtail, especially now that
the HistoryView has been reimplemented using the dropdown menu for the
actions.
2024-04-30 16:13:33 +01:00
Sage Abdullah b8dd7f484f Fix icon alignment in page listings 2024-04-30 16:13:33 +01:00
Thibaud Colas d04746bf9e Adjust admin UI components based on desired interface density 2024-04-18 13:04:25 +01:00
Thibaud Colas bd6f314b87 Refactor CSS selectors in title panel override for readability 2024-04-18 13:04:25 +01:00
sag​e c1a23b4bd3
Tweak styles for w-header-button to better match the designs (#11863) 2024-04-18 12:29:01 +01: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
Sage Abdullah 0006976267 Implement universal listings UI for form submissions listing view 2024-04-05 17:36:41 +01: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
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 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
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 fc3f945781
Styling fixes for universal listings (#11608) 2024-02-07 10:44:56 +00:00
Sage Abdullah e8b34ededd Implement active filter button to open drilldown for specific filter 2024-01-24 09:43:42 +00:00
Sage Abdullah dbf3c7c586
Adjust margin-bottom of w-field__wrapper in drilldown component
Prevent the focus outline from being cut-off
2024-01-23 09:43:08 +00:00
Thibaud Colas f1520bfcdd
Clean up unfinished aspects of DrilldownController 2024-01-23 09:22:30 +00:00
Thibaud Colas 68df8a0ba3
Add drilldown filters interface for universal listings 2024-01-23 09:22:30 +00:00
Thibaud Colas 4790b44ba1
Move accessibility checker inside the editor (#11478). Fix #10136 2024-01-23 08:15:34 +00:00