Ensure comment buttons always respect WAGTAILADMIN_COMMENTS_ENABLED. Fix #10406

pull/10429/head
Thibaud Colas 2023-05-12 09:39:26 +01:00 zatwierdzone przez Sage Abdullah
rodzic 1e9f925ff8
commit efb75c0ae3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
3 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -20,6 +20,7 @@ Changelog
* Fix: Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Fix: Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Fix: Ensure comment buttons always respect `WAGTAILADMIN_COMMENTS_ENABLED` (Thibaud Colas)
* Docs: Update documentation for `log_action` parameter on `RevisionMixin.save_revision` (Christer Jensen)

Wyświetl plik

@ -15,6 +15,8 @@ $button-space: theme('spacing.1');
inset-inline-end: calc(-1 * ($icon-size + $button-padding * 2));
top: 50%;
transform: translateY(-50%);
// Only show the buttons when commenting is enabled.
display: none;
opacity: 0;
.icon {
@ -23,6 +25,10 @@ $button-space: theme('spacing.1');
color: inherit;
}
.tab-content--comments-enabled & {
display: block;
}
// For devices without hover support, always show when comments are enabled.
@media (hover: none) {
.tab-content--comments-enabled & {
@ -32,8 +38,8 @@ $button-space: theme('spacing.1');
// Hide by default, reveal on hover of parent, for devices supporting hover interaction
@media (hover: hover) {
.tab-content--comments-enabled .w-field__input:hover > &,
.tab-content--comments-enabled .w-field__input:focus-within > &,
.w-field__input:hover > &,
.w-field__input:focus-within > &,
&:hover,
&:focus,
&.w-field__comment-button--focused {

Wyświetl plik

@ -15,6 +15,7 @@ depth: 1
* Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Ensure comment buttons always respect `WAGTAILADMIN_COMMENTS_ENABLED` (Thibaud Colas)
### Documentation