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)
- Ensure help blocks show more appropriately in Windows High Contrast Mode with less reliance on communication via colour alone
- fixes #8817
- added dashed-dotted borders styles and removed forced-colors-adjust:none properties to/from help boxes
This makes the snippet chooser modal code a completely vanilla implementation of ChooserModalOnloadHandlerFactory, so we don't need snippet-chooser-modal.js at all.
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)
- 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
* 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
- 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
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.
- 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
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.
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.
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)
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.
* 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
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.
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
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>`
* 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
- 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>
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
* 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
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.
* 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
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
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
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.
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
* 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))
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. 😁
- 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)
- 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