Skip to content
Snippets Groups Projects
Commit 4af2000c authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Issue #3451365 by Grimreaper: Automated Drupal 11 compatibility fixes for ui_styles + code quality

parent 81d3edb2
No related branches found
No related tags found
1 merge request!57Issue #3451365 by Grimreaper: Automated Drupal 11 compatibility fixes for ui_styles + code quality
Pipeline #209439 passed
Showing
with 89 additions and 68 deletions
dropteam
dureau
fanini
florent
grimreaper
pdureau
torregrosa
......@@ -77,15 +77,3 @@ The module has no menu or modifiable settings. There is no configuration.
The submodules provide new configuration options depending on the submodule
specificities.
## Maintainers
Current maintainers:
- Florent Torregrosa - [Grimreaper](https://www.drupal.org/user/2388214)
- Pierre Dureau - [pdureau](https://www.drupal.org/user/1903334)
- Michael Fanini - [G4MBINI](https://www.drupal.org/user/2533498)
Supporting organizations:
- [Smile](https://www.drupal.org/smile)
- [Dropteam](https://www.drupal.org/dropteam)
name: 'UI Styles Block'
type: module
description: 'Apply styles to blocks in the block layout.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- drupal:block
......
/* Toolbar dropdown button On state. */
.ck.ck-dropdown.ck-ui-styles-block-dropdown.ck-ui-styles-block-dropdown-active > .ck-button.ck-dropdown__button:not(.ck-disabled) {
.ck.ck-dropdown.ck-ui-styles-block-dropdown.ck-ui-styles-block-dropdown-active
> .ck-button.ck-dropdown__button:not(.ck-disabled) {
color: var(--ck-color-button-on-color);
background: var(--ck-color-button-on-background);
}
/* Style plugin dropdown button On state. */
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown.ck-ui-styles-block-dropdown-style-dropdown-active > .ck-button.ck-dropdown__button:not(.ck-disabled) {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown.ck-ui-styles-block-dropdown-style-dropdown-active
> .ck-button.ck-dropdown__button:not(.ck-disabled) {
color: var(--ck-color-button-on-color);
background: var(--ck-color-button-on-background);
}
/* Dropdown icon point to the right. */
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown > .ck-button.ck-dropdown__button > .ck-dropdown__arrow {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
> .ck-button.ck-dropdown__button
> .ck-dropdown__arrow {
rotate: 270deg;
}
......@@ -19,25 +23,35 @@
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown {
width: 100%;
}
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown > .ck-button.ck-dropdown__button {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
> .ck-button.ck-dropdown__button {
min-width: 100%;
}
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown > .ck-button.ck-dropdown__button > .ck-button__label {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
> .ck-button.ck-dropdown__button
> .ck-button__label {
width: 100%;
}
/* Reduce height of style options list. */
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-list__item .ck.ck-button {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-list__item
.ck.ck-button {
padding-top: var(--ck-spacing-tiny);
padding-bottom: var(--ck-spacing-tiny);
}
/* Case it opens to the bottom */
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_s,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_se,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_sw,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_sme,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_smw {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_s,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_se,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_sw,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_sme,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_smw {
top: 0;
right: auto;
left: auto;
......@@ -45,11 +59,16 @@
}
/* Case it opens to the top. */
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_n,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_ne,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nw,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nme,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nmw {
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_n,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_ne,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nw,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nme,
.ck.ck-dropdown.ck-ui-styles-block-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nmw {
right: auto;
bottom: 0;
left: auto;
......
/* Toolbar dropdown button On state. */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown.ck-ui-styles-inline-dropdown-active > .ck-button.ck-dropdown__button:not(.ck-disabled) {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown.ck-ui-styles-inline-dropdown-active
> .ck-button.ck-dropdown__button:not(.ck-disabled) {
color: var(--ck-color-button-on-color);
background: var(--ck-color-button-on-background);
}
/* Style plugin dropdown button On state. */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown.ck-ui-styles-inline-dropdown-style-dropdown-active > .ck-button.ck-dropdown__button:not(.ck-disabled) {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown.ck-ui-styles-inline-dropdown-style-dropdown-active
> .ck-button.ck-dropdown__button:not(.ck-disabled) {
color: var(--ck-color-button-on-color);
background: var(--ck-color-button-on-background);
}
/* Dropdown icon point to the right. */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown > .ck-button.ck-dropdown__button > .ck-dropdown__arrow {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
> .ck-button.ck-dropdown__button
> .ck-dropdown__arrow {
rotate: 270deg;
}
......@@ -19,25 +23,35 @@
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown {
width: 100%;
}
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown > .ck-button.ck-dropdown__button {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
> .ck-button.ck-dropdown__button {
min-width: 100%;
}
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown > .ck-button.ck-dropdown__button > .ck-button__label {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
> .ck-button.ck-dropdown__button
> .ck-button__label {
width: 100%;
}
/* Reduce height of style options list. */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-list__item .ck.ck-button {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-list__item
.ck.ck-button {
padding-top: var(--ck-spacing-tiny);
padding-bottom: var(--ck-spacing-tiny);
}
/* Case it opens to the bottom */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_s,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_se,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_sw,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_sme,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_smw {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_s,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_se,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_sw,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_sme,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_smw {
top: 0;
right: auto;
left: auto;
......@@ -45,11 +59,16 @@
}
/* Case it opens to the top. */
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_n,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_ne,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nw,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nme,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown .ck.ck-dropdown__panel.ck-dropdown__panel_nmw {
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_n,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_ne,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nw,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nme,
.ck.ck-dropdown.ck-ui-styles-inline-dropdown-style-dropdown
.ck.ck-dropdown__panel.ck-dropdown__panel_nmw {
right: auto;
bottom: 0;
left: auto;
......
name: 'UI Styles CKEditor 5'
type: module
description: 'Allows to use styles in CKEditor 5.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- drupal:ckeditor5
......
name: 'UI Styles Entity Status'
type: module
description: 'Apply styles depending on a content entity status.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- ui_styles:ui_styles
name: 'UI Styles Layout Builder'
type: module
description: 'Apply styles to blocks & sections in Layout Builder.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- drupal:layout_builder
......
name: 'UI Styles Library'
type: module
description: 'Displays styles in a library page.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- ui_styles:ui_styles
name: 'UI Styles Page'
type: module
description: "Apply styles to themes' regions."
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- ui_styles:ui_styles
name: 'UI Styles Views'
type: module
description: 'Apply styles to view parts.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
dependencies:
- drupal:views
......
parameters:
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
excludePaths:
- */bower_components/*
- */node_modules/*
# Ignore some type hint errors due to hooks that should not have typed hint
# parameters or return.
ignoreErrors:
- identifier: missingType.generics
- identifier: missingType.iterableValue
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"
-
message: '#Function [a-zA-Z0-9\\_]+\(\) has parameter \$[a-zA-Z0-9\\_]+ with no typehint specified\.#'
paths:
......
......@@ -71,7 +71,7 @@ class MachineNameTraitTest extends KernelTestBase {
/**
* Data provider for test methods.
*/
public function providerTestStrings(): array {
public static function providerTestStrings(): array {
return [
'string' => [
'test',
......
......@@ -36,7 +36,7 @@ class UiStylesRenderElementTest extends KernelTestBase {
/**
* Data provider for testIsAcceptingAttributes().
*/
public function providerTestAttributes(): array {
public static function providerTestAttributes(): array {
$data = [
'already_exist' => [
[
......
......@@ -50,7 +50,7 @@ class StyleDefinitionTest extends UnitTestCase {
* @return array
* Data.
*/
public function definitionGettersProvider(): array {
public static function definitionGettersProvider(): array {
return [
['getProvider', 'provider', 'my_module'],
['id', 'id', 'plugin_id'],
......@@ -93,7 +93,7 @@ class StyleDefinitionTest extends UnitTestCase {
* @return array
* Data.
*/
public function definitionGetOptionsAsOptionsProvider(): array {
public static function definitionGetOptionsAsOptionsProvider(): array {
return [
[[
'simple' => 'Simple',
......@@ -131,7 +131,7 @@ class StyleDefinitionTest extends UnitTestCase {
* @return array
* Data.
*/
public function definitionGetOptionsForPreviewProvider(): array {
public static function definitionGetOptionsForPreviewProvider(): array {
return [
'simple' => [
[
......@@ -314,7 +314,7 @@ class StyleDefinitionTest extends UnitTestCase {
* @return array
* Data.
*/
public function definitionGetLinksProvider(): array {
public static function definitionGetLinksProvider(): array {
return [
[
[
......@@ -363,7 +363,7 @@ class StyleDefinitionTest extends UnitTestCase {
* @return array
* Data.
*/
public function definitionGetRenderLinksProvider(): array {
public static function definitionGetRenderLinksProvider(): array {
return [
[
[
......
name: 'UI Styles'
type: module
description: 'Define styles from modules and themes.'
core_version_requirement: ^10.1
core_version_requirement: ^10.1 || ^11
package: 'User interface'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment