0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 09:33:54 +01:00
Commit Graph

1064 Commits

Author SHA1 Message Date
LB Johnston
b66d2232d0 remove needless stylelint disables 2022-07-06 19:23:38 +10:00
LB Johnston
220fedaec9 cleanup - add noop function for common usecase
- this avoids the need to add ignoring where used legitimately
2022-07-06 19:23:14 +10:00
LB Johnston
510a6bf350 utils/text - move cleanForSlug into same file & add tests/jsdoc 2022-07-06 19:22:04 +10:00
LB Johnston
0dfa39d3c5 eslint - remove react/jsx-no-useless-fragment ignoring & fix 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
PaarthAgarwal
79a212b4b5 added prefix w- before header classes
- refine existing scss to use classes & remove unused scss
2022-07-06 19:13:19 +10:00
LB Johnston
cff9aac514 remove commented out css 2022-07-06 19:13:19 +10:00
PaarthAgarwal
3b9c9fce5b adopt the shared header include in the dashboard (home) view 2022-07-06 18:30:08 +10:00
Matt Westcott
dc99bd02c1 Change create tab ID back to 'upload'
This allows the 'upload one now' link to work again without having to update the translation string (which has tab-upload hard-coded)
2022-07-04 19:01:28 +01:00
Matt Westcott
cbe8e3e794 move collection chooser into filter form 2022-07-04 19:01:28 +01:00
Matt Westcott
0159913261 use generic creation_form.html for document chooser upload template 2022-07-04 19:01:28 +01:00
Matt Westcott
3b993611b0 Inherit from generic chooser.html template 2022-07-04 19:01:28 +01:00
Matt Westcott
4dd3483617 Add a (non-functional) 'create' form to generic chooser modal 2022-07-04 13:48:35 +01:00
LB Johnston
04839f7caf Migrate Portal React component to Typescript 2022-07-04 11:57:28 +01:00
LB Johnston
2ba00d99b0 fix - ensure tooltips get re-initialised
- chooser modals (e.g. documents)
- header search
2022-07-04 07:57:16 +10:00
Matt Westcott
172b133568 Eliminate the custom response name 'snippetChosen'
This makes the snippet chooser modal code a completely vanilla implementation of ChooserModalOnloadHandlerFactory, so we don't need snippet-chooser-modal.js at all.
2022-06-29 13:42:04 +10:00
Matt Westcott
be5b8c41c7 Deprecate createSnippetChooser 2022-06-29 13:42:04 +10:00
Matt Westcott
f3e40571f1 Make SnippetChooser a subclass of Chooser 2022-06-29 13:42:04 +10:00
Matt Westcott
b5733d92d4 eliminate jquery from SnippetChooser 2022-06-29 13:42:04 +10:00
Matt Westcott
9af3efd261 Refactor a SnippetChooser class out of createSnippetChooser
Use the client/src/components/ChooserWidget Chooser class as a guide, but don't copy code from there (so that any snippet-specific customisations don't get lost in translation)
2022-06-29 13:42:04 +10:00
Bernd de Ridder
013ff2179b Update human-readable-date with accessible tooltip
- resolves #8697
2022-06-29 11:02:16 +10:00
PaarthAgarwal
87172278a9 Remove old legacy breadcrumbs completely 2022-06-28 22:13:06 +10:00
LB Johnston
d6baee0754 gettext utils - fix issue where ngettext would not work
- ngettext was not correctly set up and would not do any pluralisation
- add full unit test suite for JS translation utils
- add full JSDOC definitions for JS translation utils
2022-06-27 14:44:32 +01:00
LB Johnston
f797896cba Update some React component files to use .tsx
- these can be converted to Typescript components without any changes
2022-06-27 09:45:59 +01:00
LB Johnston
f252aa83d1 eslint - remove prefer-object-pread ignoring & format/fix 2022-06-24 11:17:04 +01: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
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
PaarthAgarwal
4411b76388 Added new non collapsible breadcrumbs to page chooser 2022-06-23 07:16:19 +10:00
PaarthAgarwal
8c2c4a1098 Add new breadcrumbs to page explorer
- added test and updated existing test for breadcrumbs-next
- fix background issue so that the breadcrumbs work correctly on any background
2022-06-15 17:27:33 +10:00
Jacob Topp-Mugglestone
46d947bb07
Fix/splitting blocks with highlights (#8668)
* Fix splitting block with highlighted text deleting text

* Fix issue with splitting blocks at start/end crashing editor

* Add unit tests for Draftail split behaviour
2022-06-13 16:33:57 +01:00
LB Johnston
9cb0c96001 fix issue with spinner icon & longrunning active state
- using padding meant the icon would visually spin 'wobbly'
- button content is no longer centre aligned so button longrunning active state should not be either
- fixes #8615
2022-06-13 15:29:55 +01:00
PaarthAgarwal
25b82aef76 Removed breadcrumbs next's reliance on data-slim-header
- fixes #8644
2022-06-13 21:24:38 +10:00
Matt Westcott
2e08b67546 Eliminate jQuery from chooser widget 2022-06-12 15:47:24 +10:00
Matt Westcott
79884dd257 Add generic chooser widget JS 2022-06-12 15:47:24 +10:00
Matt Westcott
c90bbcb9c8 Add a default chooser-modal.js endpoint for chooser modals that need no custom JS configuration 2022-06-12 15:47:24 +10:00
LB Johnston
2abe439064 ensure non-square avatar image will correctly overlay content
- fixes #8428
2022-06-12 15:26:11 +10:00
Sage Abdullah
052115f261 Fix locale selector background color
- fixes #8588
2022-06-10 07:38:20 +10:00
Steve Steinwand
ab92256b09 Fix sidebar rtl styles, add wagtail branding module to sidebar stories
- fixes #8641
2022-06-09 22:03:03 +10:00
PaarthAgarwal
764d3bc1fd Adopted new Tabs in Workflow History Detail page
- resolves #8562
2022-06-09 17:32:47 +10:00
Thibaud Colas
fbabd6ef5e Disable Webpack css-loader URL handling in Storybook. Fix #8646 2022-06-09 17:12:52 +10:00
Matt Westcott
d641f6a9ac Restore previous styles for status tags in title cell 2022-06-08 17:35:40 +01:00
Matt Westcott
d21cdad976 Convert search results view to wagtail.admin.ui.tables framework 2022-06-08 17:35:40 +01:00
Matt Westcott
87db15927a Move _page_title_choose.html include contents into _list_choose.html 2022-06-08 17:35:40 +01:00
Matt Westcott
a3098acd53 Move parent page row into the <tbody> element
The general-purpose listing include put it in the `thead` to handle the explorer page design (where the parent page appears above the header row) - it isn't really meaningful for the chooser view to do that.
2022-06-08 17:35:40 +01:00
Thibaud Colas
4eb35dbc0a Refactor styles to be loaded via single core.css file (#8419) 2022-06-07 13:26:58 +01:00
Thibaud Colas
2ab656a8d3 Move Wagtail’s stylesheets and vendor CSS & image files to client subfolder (#8419) 2022-06-07 13:26:58 +01:00
LB Johnston
6d0659333d fix spelling - behaviour vs behavior
- documentation should be using the British english spelling
- most other spelling is `behaviour` so this aligns with the majority
2022-06-02 07:56:05 +10:00
jacobtoppm
a72b89b38d Tweak border: none to border: 0 to fix linting 2022-06-01 17:19:17 +01:00
Tidiane Dia
5af282625d Make images listing style consistent across views 2022-06-01 16:50:25 +01:00
Tidiane Dia
a5e5f46b2d Group filter select fields in images listing view 2022-06-01 16:50:25 +01:00
Steve Stein
910844eb30
Implement redesign of the Workflow Status dialog, fixing accessibility issues. Fix #8476 (#8538)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-06-01 16:21:11 +01:00
LB (Ben Johnston)
0012c344d9
auto-format core markdown files (#8603)
- clean up formatting on existing martkdown files to align with prettier
2022-06-01 23:08:56 +10: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
Paarth Agarwal
61c9422104
Added unit test for breadcrumb (#8606)
* completed tests for breadcrumbs
* clean up redundant code
2022-05-30 17:04:43 +10:00
Tibor Leupold
4f5d688021 Add ability for upgrade notification to show the relevant release to the user
This now implements the logic to link to the next minor's release notes
when such a version difference is computed. If a patch release
difference is computed, then those release notes are linked.

The utils.tests.js seemed a bit unexpected location, because there is no
`utils.js` module. Now the module defining the tests and the one
defining the functionality are named similarly, as is common in the rest
of the code base.

- resolves #7336
- resolves #7405
- resolves #3938
- fixes #8537

Fix issue where upgrade notification was not using translated content.
2022-05-26 19:57:46 +10:00
Hitansh Shah
f8a7c6f4ae Added functionality in bulk actions: ability to use shift+click to select multiple items at once
- Signed-off-by: Hitansh Shah <shah.hitanshsanjay.mat20@itbhu.ac.in>
- resolves #8490
2022-05-25 21:45:12 +10:00
Stefan Hammer
906dfa2773 Added missing gettext calls to the CommentComponent 2022-05-25 20:45:09 +10:00
Matt Westcott
a67fd85fcf Rename reshow_upload_form step on document chooser to reshow_creation_form
We'll standardise on this name, since not all creation forms involve uploads.
2022-05-25 20:10:47 +10:00
Matt Westcott
34f646c611 Move reshow_creation_form step handling into the base ChooserModalOnloadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott
29fbfd0ea4 Move ajaxifyDocumentUploadForm logic into the base ChooserModalOnLoadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott
c5d6bb32e5 Use data-chooser-modal-search-filter attribute to identify the snippet locale filter 2022-05-25 20:10:47 +10:00
Matt Westcott
b45d2a0973 Adopt a standard data-chooser-modal-search attribute to identify the search form 2022-05-25 20:10:47 +10:00
Matt Westcott
b958585ff8 Add a containerElement option to SearchController to limit scope of selectors
This will allow us to use more generic selector names without risking false matches. While we're at it, consistently use containerElement as the variable name for this rather than context, because context typically refers to template context dictionaries.
2022-05-25 20:10:47 +10:00
Matt Westcott
910ca8ca51 Change document chooser step names to 'choose' and 'chosen' for consistency with snippet chooser 2022-05-25 20:10:47 +10:00
Matt Westcott
b37d16b07b Adopt a standard data-chooser-modal-choice attribute to identify 'chosen' links 2022-05-25 20:10:47 +10:00
Matt Westcott
b5746c386b Convert document chooser modal onload handlers to a subclass of ChooserModalOnloadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott
0ac07eba5e Introduce a factory class for generating the onload handlers 2022-05-25 20:10:47 +10:00
Matt Westcott
6b30a1aae9 Use SearchController on task chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott
fc31a6711d Use SearchController on snippet chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott
1fc66294a4 Move snippet-chooser-modal.js to client js 2022-05-25 19:00:50 +10:00
Matt Westcott
2af6ad3683 Use SearchController on document chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott
6e9660c67b Add a reusable helper function for submitting creation forms 2022-05-25 19:00:50 +10:00
Matt Westcott
d311a40e27 Use gettext for server error messages in modals
This avoids the need to pass them in jsonData (which was broken in a few cases anyhow, since we were forgetting to pass jsonData to the ajaxify function)
2022-05-25 19:00:50 +10:00
Matt Westcott
9aa672c01c Add a get_value_data method to AdminTaskChooser for consistency with others 2022-05-25 16:32:07 +10:00
Matt Westcott
55fdafdfe6 Make radio buttons / checkboxes display vertically under Django 4.0
Fixes #8190
Django 4 changed the rendering of radio button / checkbox lists to nested divs rather than ul/li - see 5942ab5eb1. This change simply applies the existing li styles to second-level divs.
2022-05-25 08:31:11 +10:00
Matt Westcott
820c27fca9 lint fix for dialog.js
I'm guessing this was caused by #8541 and #8543 being merged in close succession...
2022-05-20 16:55:06 +01:00
LB (Ben Johnston)
7c9b6fd415
Cleanup - eslint config fixes (#8543)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 16:08:13 +01:00
Steve Stein
6343a9558c
Implement new reusable dialog component with a11y-dialog (#8541)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 15:02:32 +01:00
LB (Ben Johnston)
9f206d258c
Make it possible to reuse and customise Wagtail’s fonts with CSS variables. Fix #8406 (#8544)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 14:19:30 +01:00
Karl Hobley
2a40333770 Set referer policy of upgrade notifcation to "strict-origin-when-cross-origin"
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
- Since Django 3.1, all Wagtail admin responses have been given a referer-policy: same-origin header. See: https://chipcullen.com/django-3-referrer-policy-change/
2022-05-19 08:37:25 +10:00
Steve Stein
851ec9a5c1 Apply full header breadcrumb spacing fixes for all templates (#8471, #8491) 2022-05-13 17:09:01 +01:00
Matt Westcott
2da1a051c7
Make 'upload one now' link on document chooser work after results refresh (#8529)
* Make 'upload one now' link on document chooser work after results refresh

Fixes #8528
Put the initTabs call inside ajaxifyLinks so that it's reapplied when the results container (including the 'no results message') is replaced.

* Make 'create one now' link on task chooser work after results refresh
2022-05-13 12:13:36 +01:00
LB Johnston
d9981e0ec7 fix up spelling in documentation & docstrings (should be en-GB not en-US)
- customize -> customise
- color -> colour
- customizing -> customising
- organize -> organise
2022-05-13 08:13:06 +10:00
Matt Westcott
7d8d900d10
Set comment position correctly relative to scroll position (#8511)
Fixes #8500. As a consequence of the CSS changes in c6fdb6bbb3, scroll position is no longer reflected in the document element's scrollTop property, but on the `<main>` element instead. As a result, comment positions were not being adjusted for scroll position. To account for this (and any future CSS changes), we walk all ancestor elements to calculate the true scroll position.
2022-05-12 14:11:47 +01:00
Thibaud Colas
7129ccefc9 Remove logical properties compatibility styles for Safari 13
- update caniuse-db & browserslist
- resolves #8124
2022-05-11 21:41:15 +10:00
jacobtoppm
7e98db7197 Disable webpack css url rewriting
This was causing relative urls to be rewritten to use the publicPath.
This meant that the icon font would be referenced at the wrong location
if sites had changed STATIC_URL
fixes #8517
2022-05-11 19:27:49 +10:00
Thibaud Colas
74ed301562 Fix cropped descenders in sidebar 2022-05-10 16:56:08 +01:00
Thibaud Colas
5afbd6371a Adjust branding spacing in sidebar 2022-05-10 16:55:37 +01:00
Steve Stein
95fcddd9d2
Switch locales selector JS error (#8468). Fix #8466, #8462
* Check for hover tool tip instance to avoid throwing errors

* Remove multiple attr because it is un-needed now
2022-05-06 16:10:09 +01:00
Thibaud Colas
d4f6e81067 Fix last integration test failure 2022-04-29 14:43:45 +01:00
Steve Stein
bb083e4463
Status sidebar design review and fixes (#8445)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-29 14:38:53 +01:00
LB (Ben Johnston)
30e1e06a59
Make new font stacks available as css custom properties (3.0) (#8415)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-29 14:23:55 +01:00
Steve Stein
e8c8ae778f
Allow external tab triggers - Underline tab issue (#8454)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-29 14:21:54 +01:00
Thibaud Colas
28c6a96de8
Separate tab focus and selection to avoid always setting URL hash (#8460) 2022-04-29 14:01:13 +01:00
Thibaud Colas
03bbc2c747
Page explorer regression fixes (#8459) 2022-04-29 14:00:19 +01:00
Steve Stein
20d9fd145e
Design review updates - Remove tab animation, adjust tab spacing and high contrast support, sidebar alignment (#8452) 2022-04-29 13:51:42 +01:00
Karl Hobley
ad8e8034da
Header styling tweaks (#8438)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-29 12:59:52 +01:00
Thibaud Colas
64d99d5f57 Fix failing unit tests from #8447 2022-04-29 12:06:44 +01:00
Steve Stein
815f621df4
Resize textareas onload and tab-changed event (#8442) 2022-04-29 11:37:20 +01:00
Thibaud Colas
d2aefa547c
Re-add Pages explorer focus trap. Fixes #8035 (#8447) 2022-04-29 11:33:29 +01:00
Steve Stein
8efb235695
Restyle badge for tab errors (#8446) 2022-04-28 13:49:54 +01:00
Steve Stein
7756453849
Breadcrumbs & Slim header design review styling (#8434)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-28 13:25:59 +01:00
Steve Stein
db5f4106db
Sidebar animation fixes (#8423). Fix #8311
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

- Animations – The close animation for sub-menus doesn't seem to play when the menu is expanded - Made it so sub menu's stay open when the menu is expanded and collapsed
- Animations – The account menu seems to have a different tween animation to the rest of the menu. Causing it to do a weird thing when you collapse the menu while the account menu is open
- Animations – The avatar suddenly jumps to the right when you collapse the menu
- Animations – The Bird seems to have two hover states (try slowly moving your mouse cursor from top to bottom and you'll see it's wing appears before the hover animation is triggered). Not sure if this is intended behaviour.
- Accessibility – Focus order is incorrect on the mobile version (it should be possible to move to the sidebar after having toggled it)
- Try and fit more letters in to the sidebar menu items by reduce the padding / margin on the right side of the arrow, and reduce the gap between the icon and the text a tiny bit
- Make it so when you have a menu open (e.g. Bakery misc) and you click the slim sidebar icon, the menu stays open as the menu gets slim.
- Add a label to the sidebar’s `<aside>`
2022-04-28 02:14:18 +01:00
Tidiane Dia
94b20b418a
More actions dropdown button toggling on bulk actions (#8057)
* Hide more actions dropdown button on listing pages when performing actions in bulk

* Add toggleMoreActionsDropdownBtn function

* Fix lint issues

* Use if/else statement instead of ternary operator to avoid lint warning
2022-04-25 14:53:13 +01:00
Thibaud Colas
1cd784adb7 Add basic "multilingual support" section 2022-04-23 01:05:27 +01:00
Thibaud Colas
a395d9c565 Auto-generate docs for most important design tokens 2022-04-23 01:05:27 +01:00
Thibaud Colas
bd874c63c9 Implement colors palette visualisation with contrast grid link 2022-04-23 01:05:27 +01:00
Thibaud Colas
5fd3962d7f Update existing stories with latest storybook-django version 2022-04-23 01:05:27 +01:00
Steve Stein
64dd361cf7
Slim sidebar visual design issues (#8404)
- Visual design – Collapsed sidebar is wider than intended
- Visual design – Change “Edit your account” to “Account” tooltip
- Visual design – Slim side bar on bird hover, make the bird a little big bigger (don’t make it shrink as much)
- Visual design – Change the tooltip to the darker indigo (discussed with ben and this is no longer necessary)
- Visual design – Expand the space between the menu items (add 3px padding) - then adjust the flyout menu items spacing too
- Visual design – Get the labels and icons to align vertically (space between icon and label)
- Visual design – Make the width 60px
- Visual design – Make the arrows slightly smaller and closer to the icons on slim view
- Visual design – Move the bird higher up and slightly smaller, as per the designs
- Animations – I wonder if the new |-> icon should flip horizontally rather than roll? (or maybe not animate at all?) The rolling animation feels a little strange as I think the pipe is meant to represent the always vertical menu
- Animations – The Bird seems to have two hover states (try slowly moving your mouse cursor from top to bottom and you'll see it's wing appears before the hover animation is triggered). Not sure if this is intended behaviour.
- UX – Unexpected behavior with the search – clicking the "Search" icon submits a search, while all other icons in the sidebar are safe to click (This will expand the menu in slim mode and only have pointer events to submit in expanded mode which should be acceptable as its the submit button for the field?)

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-23 00:10:32 +01:00
Steve Stein
92705d8f06
Design review changes - Info panel, Page title field (#8411)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

-Add a down arrow to right of Switch Locales
- Change the wording “Set Privacy” to “Change Privacy”
- Make the close icon on the info panel the same size as the close icon on the slim sidebar
- Make title field text font weight 800
2022-04-22 22:08:04 +01:00
Matt Westcott
262e94401a
Housekeeping to start work on 4.0 (#8420)
* Add release notes page for 4.0

* Version bump to 4.0

* Rotate deprecation warnings
2022-04-22 14:25:16 +01:00
Steve Stein
90ccbff15b
Add comment notifications switch back into tabs (#8392) 2022-04-22 13:05:13 +01:00
Karl Hobley
a78216320a
Close the side panel when comments are selected (#8357)
* Move page history button to after the side panel toggles

This was requested by Ben to make the "Info" button come first

* Close the side panel when comments are selected
2022-04-14 11:07:57 +01:00
LB Johnston
5df15bed24 fix minor linting issue page-editor.js 2022-04-14 19:44:29 +10:00
Rishank
7861014316 add Monospace system UI font stack
resolves #8043

ui-monospace, Menlo, Monaco, ... "Courier New", monospace

Operating Systems and their fonts:
ui-monospace -> MacOS (Menlo, Monaco fallback)
Cascadia  ->Windows (since Vista)
Roboto -> Android (since 4.0)
Fira -> Firefox OS
Droid -> Android (<4.0)
Oxygen -> KDE
Ubuntu -> Ubuntu
In addition, ui-monospace is supported for Safari/MacOS (only way to access SF Mono in Mac);

Cascadia is a new Microsoft font-face, and Segue is the fallback.
2022-04-14 19:44:29 +10:00
Steve Stein
b3f95f82ff
Fix comment count styling (#8355)
* Return comment count to header toggle with placeholder styling

* Fix comment count styling, adjust sidebar sizing and comment toggle space

* Remove comment spacing fix for now
2022-04-14 00:09:24 +01:00
jacobtoppm
66c2f3d328 Return comment count to header toggle with placeholder styling 2022-04-13 18:19:05 +01:00
Tidiane Dia
503298556e Add logic to detect duplicates when uploading an image via a modal
Add client-side logic to confirm a duplicate upload

Add template shown when a duplicate image is found via modal upload

Style duplicate upload template shown in modal

Add test for duplicate image upload in modal chooser

Avoid loading all duplicates in memory and use f-string

Make template fragments translatable and use image templatetag to render images

Use class selector instead of direct element one

Set primary button to 'Use existing and delete new' on duplicate upload
2022-04-13 17:59:51 +01:00
Tidiane Dia
c136f461bc Add duplicate detection to multiple image upload view
Add utility function to find an image's potential duplicates

Add logic to detect duplicates on multiple images upload view

Add template shown when a user is prompted to confirm a duplicate upload

Add client-side logic to confirm a duplicate upload

Add/update styles

Add tests for duplicate image uploads

Index Image file_hash field

Ensure that a user can choose an image from duplicates returned by find_image_duplicates

Use CSS classes instead of HTML elements to hide edit form on duplicate upload

Add ImagesPermissionPolicy helper to retrieve the permission policy dynamically

This allows test cases that override the base image model to pick up the corresponding permission policy, should they need it.

Remove usage of sibling selector

Use wagtail image templatetag to generate image

Renamed ImagesPermissionPolicy to ImagesPermissionPolicyGetter

Fail loudly when setting permission policy and a wromg image model is provided

Add decorator to disconnect a signal's receiver during a test execution and use it in get_image_model tests

Improve warning message on duplicate upload in multiple upload view

Show matching form when confirming a duplicate upload
2022-04-13 17:59:51 +01:00
jacobtoppm
cbbdc3a665 Remove remaining uses of blocks receiving parent references 2022-04-13 15:27:30 +01:00
jacobtoppm
3ae0ba51a2 Switch to cut icon, and grey out rather than remove when disabled 2022-04-13 15:27:30 +01:00
jacobtoppm
85457cdad4 Fix js linting issues 2022-04-13 15:27:30 +01:00
jacobtoppm
7787abad2f Tests for splitting 2022-04-13 15:27:30 +01:00
jacobtoppm
c94b09d14b Switch to placeholder icon and translated text for split control 2022-04-13 15:27:30 +01:00
jacobtoppm
e938a9c3aa Move comments appropriately when splitting block 2022-04-13 15:27:30 +01:00
jacobtoppm
4123e2d386 Remove split control when at max block count 2022-04-13 15:27:30 +01:00
jacobtoppm
f0c42c8f4d Draftail widget splitting, permanently on 2022-04-13 15:27:30 +01:00
jacobtoppm
e2c1587f15 Make parentCapability updates use functions rather than events, to make setting other options simpler 2022-04-13 15:27:30 +01:00
jacobtoppm
08fe817375 Add setState to Draftail widget 2022-04-13 15:27:30 +01:00
jacobtoppm
8be861bc0d Start adding split block tests 2022-04-13 15:27:30 +01:00
jacobtoppm
a51a8483b0 Add StreamField parentCapabilities object, using 'duplicate' as an example function. 2022-04-13 15:27:30 +01:00
Steve Stein
f323d88765
Move page meta information from the header to a new status side panel component inside of the page editing UI (#8285)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-13 03:21:51 +01:00
Karl Hobley
a8967b5894
Page editor side panels (#8281)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-12 23:10:48 +01:00
Steve Stein
629ced01ca
Page editor underline tabs (#8266)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-12 16:11:08 +01:00
Steve Stein
8bbf41627b
Implement new slim page editor header with breadcrumb (#8231)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Co-authored-by: Dan Braghis <dan@zerolab.org>
Co-authored-by: Karl Hobley <karl@kaed.uk>
2022-04-08 17:36:47 +01:00
Thibaud Colas
8694317fb4 Add back support for custom attributes on menu items 2022-04-08 11:51:09 -04:00
Thibaud Colas
4dc5f3c595 Remove legacy sidebar, refactoring slim sidebar implementation 2022-04-08 11:51:09 -04:00
dependabot[bot]
79ad6b65c1 Bump minimist from 1.2.5 to 1.2.6 in /client/tests/integration
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 06:49:08 +10:00
Thibaud Colas
34cd9e2aaa Code review cleanup 2022-04-01 17:01:26 -04:00
Karl Hobley
849ac514a2 Define gettext functions in an importable module 2022-04-01 17:01:26 -04:00
Karl Hobley
2b1d1d0749 Add a script to extract strings from javascript 2022-04-01 17:01:26 -04:00
Karl Hobley
1e884285a1 Replace STRINGS constants with gettext 2022-04-01 17:01:26 -04:00
Matt Westcott
97e781e31c Renumber Wagtail 2.17 to 3.0
As per discussion on https://github.com/wagtail/wagtail/discussions/7732, the changes in the upcoming release (sidebar redesign, removal of hallo.js, module reorganisation) warrant a version bump to 3.0 if we're following semantic versioning.
2022-03-31 06:38:27 +10:00
Steve Stein
af4c4d0653
Change slim sidebar to be fully usable in slim mode. Fix #7918 (#8197)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

- Removing the peeking attribute so the sidebar only opens when intentionally set to expanded mode by using expand or search or account functionalities
- Adding tooltips on link item hovers
- Expanding of slim sidebar when search is clicked and when account options are clicked
2022-03-28 15:43:35 +01:00
Luis Espinoza
b53017ad94 remove redundant role="main" for <main> 2022-03-26 12:03:35 -07:00
Steve Stein
229fbf476a
Sidebar style updates (#8118)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-03-23 03:27:12 +00:00
PaarthAgarwal
a412dcc8d5 styles - disable text-transform property-disallowed-list for required usage 2022-03-22 08:24:52 +10:00
PaarthAgarwal
255d5e9b03 removed redundant text-transform instances
removed page-specific overrides css from importing
2022-03-22 08:11:41 +10:00
Thibaud Colas
a50ebe9f83
Tailwind setup follow-up: RTL support and Windows High Contrast mode (#8117)
Co-authored-by: LB (Ben Johnston) <mail@lb.ee>
2022-03-15 15:05:18 +00:00
LB (Ben Johnston)
042d077fc1
Minor accessibility fixes to new slim sidebar menu items (#8015)
* Consistently set `aria-haspopup="menu"` for all sidebar menu items that have sub-menus (LB (Ben Johnston))
 * Make sure `aria-expanded` is always explicitly set as a string in sidebar (LB (Ben Johnston))
 * Use a button element instead of a link for page explorer menu item, for the correct semantics and behavior (LB (Ben Johnston))
2022-03-15 14:53:40 +00:00
Thibaud Colas
14280ad7ea
Convert all UI code to CSS logical properties (#8051)
- Rewrite all styles to use logical properties
- Update Stylelint configuration to include logical properties checks
2022-03-15 13:21:06 +00:00
PaarthAgarwal
4b07e4214a
Remove most uppercased text styles from admin UI. Fix #7624 (#8111)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-03-15 12:07:07 +00:00
PaarthAgarwal
6a84cf4583
Switch focus outlines implementation to :focus-visible for cross-browser consistency. Fix #7994 (#8113)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-03-15 11:33:12 +00:00
Steve Stein
5996c5dd29
Switch icons implementation to SVG, with checkbox improvements (#8054) 2022-03-07 17:06:19 +00:00
Steve Stein
07ee733bbe
Page Editor Improvements: TypeScale configuration (#8064). Fix #7982
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-03-04 22:55:24 +00:00
LB Johnston
13091eab34 remove Hallo JS 2022-03-02 20:15:33 +10:00
LB Johnston
5c01ecfa94 remove Hallo styles 2022-03-02 20:15:33 +10:00
LB Johnston
e20f3f6966 test integration - update packages
- puppeteer - v11 to v13 https://github.com/puppeteer/puppeteer/releases/tag/v12.0.0 & https://github.com/puppeteer/puppeteer/releases/tag/v13.0.0
- @wordpress/jest-puppeteer-axe" - v3 to v4 42a5611fa7/packages/jest-puppeteer-axe/CHANGELOG.md (400-2022-01-27)
- jest & expect-puppeteer - minor update
2022-03-01 22:54:12 +00:00
LB Johnston
51ba6e4c47 integration tests - update package-lock for Node v16 usage 2022-03-01 22:54:12 +00:00
Steve Stein
3bf9b65c06
Tailwind package setup (#8003)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-02-27 16:08:38 +00:00
Steve Stein
5417982b8c
Design tokens setup (#8005)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-02-25 13:34:04 +00:00
Thibaud Colas
d149a27392 Upgrade Storybook setup, with latest release, less boilerplate 2022-02-24 21:22:45 +10:00
Thibaud Colas
b3e5f751e4 Add icons loading and demo to Storybook 2022-02-24 21:22:45 +10:00
Thibaud Colas
3aae7d0583 Add base pattern library setup with Storybook 2022-02-24 21:22:45 +10:00
Thibaud Colas
939fa98ef0 Move storybook configuration to a dotless folder, for linting 2022-02-24 21:22:45 +10:00
Gianluca De Cola
aaee9b8c81 Remove IE11 warning message and related files
- resolves #7993
2022-02-22 17:22:39 +10:00
Thibaud Colas
fd8277bcf7 remove modernizr & usage 2022-02-15 16:31:57 +00:00
Thibaud Colas
81b2c56df3 Remove all focusable="false" definitions for IE11 2022-02-15 16:31:57 +00:00
Thibaud Colas
c5d2f98205 Remove redundant noopener from noreferrer rel attributes 2022-02-15 16:31:57 +00:00
Thibaud Colas
ae14fa6e76 Remove JS compatibility code for IE11 2022-02-15 16:31:57 +00:00
Thibaud Colas
9ae8204a1b Remove fallback elements for IE11 support in comment headers 2022-02-15 16:31:57 +00:00
Thibaud Colas
9acce41fec Remove IE11-only Draftail configuration 2022-02-15 16:31:57 +00:00
Thibaud Colas
9ecc105178 Remove legacy browser styles 2022-02-15 16:31:57 +00:00
Thibaud Colas
d2d4651853 Remove polyfills only installed for IE11 2022-02-15 16:31:57 +00:00
Steve Stein
f968aac038
Update system font stack value for compatibility. Fix #7724 (#7972)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

- `-apple-system, BlinkMacSystemFont` - These are used to target modern iOS Safari, macOS Safari, macOS Firefox and macOS Chrome's system fonts. 
- ` 'Segoe UI',  system-ui,` - These fonts target windows machines on Windows 7+ [reference](https://markdotto.com/2018/02/07/github-system-fonts/#the-stack). Having system-ui placed after Segoe UI allowed Segoe UI to take precedence when used on Windows machines set to Chinese ( Simplified ) language. There are some known language issues around `system-ui` being used: [This github article](https://infinnie.github.io/blog/2017/systemui.html). However, the purpose of `system-ui` [(reference here)](https://drafts.csswg.org/css-fonts-4/#valdef-font-family-system-ui) is to allow web content to integrate with the look and feel of the native OS. Which makes this font-family a good choice for other devices _if_ the problem is solved by putting Segoe UI first. 
- `Roboto,` - This is our fallback font for androids devices. Having Segoe set before this allows windows to use its system default font even if you have installed Roboto for development reasons. 
- `Helvetica Neue,` - This is a fallback for older macOS
- `Arial` - Using this to catch any of the very old Windows versions (shoutout windows 95)
- `sans-serif` - Our last resort to get a font without serifs
- `  'Apple Color Emoji',  'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';` - All the emoji's for the OS's mentioned above. 😁
2022-02-14 15:17:02 +00:00
LB Johnston
ddcdd3e57f slim sidebar - use sameSite lax by default
- this will ensure that the cookie will work as expected in future browser changes on HTTP or HTTPS setups
- fixes #7910#
2022-02-10 15:24:54 +00:00
LB (Ben Johnston)
f2257acc2e
Remove dateformat library usage (#7907). Fix #7904
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-02-04 14:13:48 +00:00
Thibaud Colas
af942a27e4
Reformat codebase with Prettier (#7912)
- Automated reformatting
- Manually change code where Prettier reformatting causes issues
- Revert "Disable Prettier formatting in CI for now"
2022-02-04 11:57:55 +00:00
Thibaud Colas
ee15eec511 Switch all Node tooling from Gulp to Webpack, with needed code changes
- Remove gulp code and docs
- Add base CSS & SCSS processing in Webpack
- Make sure Sass files use paths that can be resolved by Webpack
- Use faster source map generation
- Clean up build scripts
- Make sure Storybook can process Sass
- Switch away from web fonts (more work needed)
2022-02-01 07:36:17 +10:00
Thibaud Colas
0d0584bdbd Update snapshots for latest Jest upgrade 2022-02-01 07:36:17 +10:00
Thibaud Colas
81ec3244d3 Upgrade ESLint configuration, with needed refactorings
- Change ESLint configuration syntax for ease of editing
- Autofix basic issues picked up by ESLint
- Make sure JS linting runs on TypeScript files
2022-02-01 07:36:17 +10:00
Thibaud Colas
23bc6b2670 Upgrade to latest Sass and stylelint configuration, with needed refactorings
- Tweak stylesheets for compatibility with latest stylelint configuration
- Move stylelint config to JS for ease of copying rules with main config
- Enforce scss/no-global-function-names by refactoring code with sass-migrator
- Run Sass code through sass-migrator
- Change stylelint configuration and code to enforce font-family-no-missing-generic-family-keyword
- Manually switch to math.div where migrator used * 0.5
2022-02-01 07:36:17 +10:00
Jérôme Lebleu
e1ecca2f3c Display the select option's text instead of value in telepath (#7629) 2022-01-21 10:52:47 +00:00
Thibaud Colas
42f140a8b9 Switch sidebar props to a JSON script tag for ease of testing 2022-01-21 10:24:02 +00:00
Dan Braghis
76ad7da450 Update move page breadcrumb 2022-01-19 22:22:40 +00:00
Dan Braghis
9c6dace720 Tidy up breadcrumb display in a .tab-merged context
e.g. the ModelAdmin InspectView
2022-01-19 22:22:40 +00:00
Dan Braghis
411d3b00d3 Make breadcrumbs styling backwards compatible 2022-01-19 22:22:40 +00:00
Dan Braghis
a8c4d578fe
Add locale switcher in the page chooser 2022-01-19 13:13:33 +00:00
Matt Westcott
8f91a86c38 Use form.serialize for posting the search form 2022-01-16 14:27:59 +10:00
Matt Westcott
d69f73aa37 replace ajax_pagination_nav with pagination_nav 2022-01-16 14:27:59 +10:00
Matt Westcott
05fdea0394 Use standard form styling for 'create task' form 2022-01-16 14:27:59 +10:00