Wykres commitów

17977 Commity (5c4f83df72551fcd04c8dd59e4d5adc744bebe72)

Autor SHA1 Wiadomość Data
Sage Abdullah 5c4f83df72 Apply new footer actions styles 2024-10-17 13:33:08 +01:00
Sage Abdullah 037a71b679 Make pages create/edit templates extend from generic create/edit templates
and reuse the markup for footer actions.

With this commit, all form footer actions are now using the single
implementation in generic/form.html template.
2024-10-17 13:33:08 +01:00
Sage Abdullah 30048e5284 Move edit and delete links in inspect view to header 'more' buttons 2024-10-17 13:33:08 +01:00
Sage Abdullah ff17060a15 Simplify template for settings edit view
This also introduces the footer actions and unsaved changes warning to
these views.
2024-10-17 13:33:08 +01:00
Sage Abdullah 6fef75376e Simplify group create/edit templates
This also introduces the footer actions and unsaved changes warning
to these views.
2024-10-17 13:33:08 +01:00
Sage Abdullah fc05b3eb59 Add footer actions to account view 2024-10-17 13:33:08 +01:00
Sage Abdullah 13e52dcc13 Simplify user create/edit templates
This also adds the footer actions and unsaved changes warning.
2024-10-17 13:33:08 +01:00
Sage Abdullah 00655b55ec Simplify workflow and tasks create/edit templates
This allows us to reuse more markup from the generic templates,
including the code for footer actions dropdown. This also gives us the
unsaved changes warning to these views.
2024-10-17 13:33:08 +01:00
Sage Abdullah 5e766e2d13 Use w-progress and w-kbd for submit button in generic create/edit template
This gives us the disabled button with spinner upon clicking, as well as
the ability to use ctrl+s to save.

Note that we do not introduce a custom label for the in-progress state
of the button yet.
2024-10-17 13:33:08 +01:00
Sage Abdullah 2c4a8bac4d Add unsaved changes warning to generic create/edit template
With this added, we can now simplify the overrides in snippets templates
for the footer actions to only override the action buttons to use the
class component.
2024-10-17 13:33:08 +01:00
Sage Abdullah 45d9efdf99 Move delete button in edit view to a header 'more' button 2024-10-17 13:33:08 +01:00
Sage Abdullah 040065c73e Use dropdown button for default delete button in generic edit view via extra_actions block
This now gives us the dropdown button for the footer actions in most
areas of the admin:

- Generic views (ModelViewSets)
- Images
- Documents
- Sites
- Locales
- Collections
- Redirects (edit view, create view TBC)

The following areas have footer actions with their own implementation,
and will be refactored in subsequent commits:

- Workflows
- Workflow tasks
- Settings

The following areas need further work before it can use footer actions,
as they still use function-based view and may not work with the generic
templates yet:

- Redirects create view
- Search promotions

Lastly, for pages and snippets, they have their own footer actions
implementation for now because they use the ActionMenu class components.

Despite this, we also want to move the 'Delete' action to the header
'more' actions dropdown rather than the footer actions. This means we'll
get rid of the extra_actions block in generic/edit.html template in the
next commit. However, we'll keep the actual dropdown markup in
generic/form.html as it's still going to be needed by the workflows and
tasks edit templates to show the enable/disable buttons.
2024-10-17 13:33:08 +01:00
Sage Abdullah f08147193f Extract shared/action_menu/menu.html and menu_item.html templates 2024-10-17 13:33:08 +01:00
Sage Abdullah 3986b45dec Introduce footer actions container to generic create/edit template
This only moves the buttons to the buttom inside the indigo/black
container as a single row. It does not introduce the dropdown
button yet.
2024-10-17 13:33:08 +01:00
Sage Abdullah 5b79c27dc9 Rename 'fields' block in generic/form.html template to form_content
This was only recently introduced in
08fd30cb65 (not yet released).

We already have a documented 'fields' block in groups and users' create
and edit views for customisation. Using the same name for the overall
form content (other than the actions) would prevent us from making use
of this block for those documented templates.

Rename the block to form_content, so we can override the block while
also defining the documented 'fields' block in groups and users' create
and edit views.
2024-10-17 13:33:08 +01:00
Sage Abdullah 2f476e10b0 Use teal background color for footer actions when reverting revisions
Fixes color contrast issue with the buttons and makes them more
consistent with the 'normal' variant (not reverting a revision).
2024-10-17 13:33:08 +01:00
Sage Abdullah 4b54e79d7b Fix rounded border radius after closing footer actions dropdown 2024-10-17 13:33:08 +01:00
Albina 488c3583b7
'Prefers-contrast' admin theming (#12348)
Co-authored-by: Victoria Ottah <82820329+Toriasdesign@users.noreply.github.com>
2024-10-17 09:13:22 +01:00
Robin Varghese 576eaf37b2
Add support for specifying different preview modes to the "View draft" URL for pages 2024-10-15 17:38:34 +01:00
Thibaud Colas 28fcd01a31 Update colors table with new theme tokens 2024-10-14 14:40:00 +01:00
Albina 9a7427a589
Incremental dashboard enhancements. Fix #12089 (#12233)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-10-14 14:39:39 +01:00
LB Johnston 309e47f0cc Add changelog for adding warning for unsaved edits in snippets
Closes #8453
2024-10-11 17:52:59 +10:00
Sage Abdullah f29d55be44 Enable unsaved changes check for snippets 2024-10-11 17:52:59 +10:00
Sage Abdullah a4f0c2138e Change page-specific message in unsaved_changes_warning.html 2024-10-11 17:52:59 +10:00
Sage Abdullah 91a6e02b20 Rename pages/_unsaved_changes_warning.html to shared/unsaved_changes_warning.html 2024-10-11 17:52:59 +10:00
Matt Westcott efa2a88642 Ensure that TypedTableBlock uses the correct API representations of child blocks
TypedTableBlock did not provide a `get_api_representation` method, so it fell back on returning the database JSON representation as returned by `get_prep_value`. This resulted in an API representation that was mostly usable, but failed to respect child blocks that override `get_api_representation` themselves.
2024-10-11 17:07:19 +10:00
Chiemezuo 5cc22f3f75 Add "description" field to AbstractImage
- Baseline support for upcoming alt text capabilities
2024-10-11 17:07:06 +10:00
Sage Abdullah 897b0415cd Ensure form is always dirty after doing edits when forceValue is true 2024-10-11 16:33:28 +10:00
Rohit Singh ff4f27b131 Update README with links to release notes and roadmap
Closes #12399
2024-10-11 16:26:14 +10:00
dependabot[bot] 23387fa2f6 Bump cookie and express
Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.21.0 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 16:25:48 +10:00
Matt Westcott 27b972d30f Add support for Python 3.13 2024-10-11 16:10:07 +10:00
Matt Westcott a199096af3 Attempt to fix CircleCI pipenv cache issues 2024-10-10 20:02:32 +01:00
Gabriel Getzie 9933432ec7 change document file_size to PositiveBigIntegerField (#12397)
Fixes #12396
2024-10-10 19:54:58 +01:00
Matt Westcott a8b4a13920 Release note for #12382 2024-10-10 19:14:26 +01:00
Matt Westcott c2782e5089 Remove image_format_name_to_content_type function
Fixes #12098

This was used in two places: in WagtailImageField.to_python (where it can be replaced with willow's mime_type as per the TODO note) and wagtail.images.models.Picture (where it's applied to a fixed list of image formats, so we can just specify the mime types directly in that list).
2024-10-10 19:03:32 +01:00
LB Johnston 912c0881f9 Remove window.fileupload_opts global usage, use data attributes instead
jQuery data is used by the jQuery file upload widget and will automatically parse data attributes as objects/or JS primitive values - see https://api.jquery.com/data/

jquery File Upload will automatically parse the data attributes and treat as the default options for initialisation (already used for the url) - see https://github.com/blueimp/jQuery-File-Upload/wiki/API#data-attributes

- Closes #9771 - avoiding globals for UI specific configs
- Relates to #1288 - ongoing work for CSP compliance
2024-10-09 08:01:44 +10:00
LB Johnston 9cbe1a507a Deprecate `window.wagtailConfig.BULK_ACTION_ITEM_TYPE` usage in JS
- Avoid using a window global and inline scripts to declare the current bulk action's item time
- Deprecate the usage of `window.wagtailConfig.BULK_ACTION_ITEM_TYPE` with a release note and code comment so that it can be removed in a future release
- Update bulk actions footer template to accept a `item_type` arg, adding this to the DOM element for access within the JavaScript
- Allow a fallback on the model name for core models (e.g. page)
- Also ensure that `{{ block.super }}` is consistently added at the top of the `{% block extra_js %}` (as it is with most usage)
- Relates to #9771 and supports a future migration for bulk actions towards Stimulus
- Relates to ongoing work for CSP compliance #1288
2024-10-08 17:55:28 +10:00
LB Johnston 39e188d040 Use correct `ACTIVE_CONTENT_LOCALE` name in wagtailConfig stubs
Fix up from #11166
2024-10-03 13:26:53 +10:00
LB Johnston d80193ff30 Fix bulk controller example code in JSDoc 2024-10-03 13:26:34 +10:00
LB Johnston 3d5c20863c Clean up JSDoc on Slugify
- Ensure it's added directly above the function
- Update the description to match the options
2024-10-02 20:02:01 +10:00
Jake Howard 4727663fa6 Remove multi-line icon comments
Ensure multi-line comments are cleaned from custom icons in addition to just single line comments.
This doesn't affect Wagtail's, but could reduce the size of 3rd-party icons.
2024-10-02 15:52:09 +10:00
rahulsamant37 50ba3a9c44 Update email notification header to new logo
- Fixes #12369
- Relates to logo update #10404
2024-10-02 15:43:57 +10:00
Matt Westcott 665b9a073e Update django-taggit dependency to allow 6.1.x
Fixes #12372
2024-09-30 17:34:18 +01:00
Krzysztof Jeziorny 72292d4d01
Documentation: Configure API to use the DRF's TokenAuthentication (#12363)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-09-29 15:59:15 +01:00
Ishwari8104 f86161ba00
Ensure dropdown toggles show with border in high contrast mode
Update _dropdown.scss (#12365)
2024-09-29 16:37:38 +10:00
Matthew Scouten 1f7710c4d8 oEmbed - Update polldaddy to crowdsignal & remove polleverywhere
- Update polldaddy oEmbed to crowdsignal (changed in 2018) https://crowdsignal.com/2018/10/18/introducing-crowdsignal/
- Remove polleverywhere as it no longer supports oEmbed
2024-09-28 18:26:53 +10:00
Drikus Roor 6aa4647120 docs: Clarify file location, add missing imports 2024-09-28 17:45:32 +10:00
Sage Abdullah 3a9b975ba1 Fix UnsavedController.forceValue not immediately notifying the unsaved changes
Fixes #12355
2024-09-28 17:41:48 +10:00
Shubham e7de2f8955 Refactor UnsavedController to use event.preventDefault() to trigger browser confirmation dialog
Per https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event

"best practice is to trigger the dialog by invoking `preventDefault()`
on the event object, while also setting `returnValue` to support legacy
cases."

We don't need to support legacy cases, as our supported browsers all
support the `preventDefault()` approach.

See also:
https://caniuse.com/mdn-api_window_beforeunload_event_preventdefault_activation

Fixes #12132

From PR #12139
2024-09-28 17:41:48 +10:00
Coen van der Kamp abcb2da372 Add translatable model copy for translation done signal (#12362) 2024-09-27 16:01:52 +01:00