Problem/Motivation

In Olivero's olivero.info.yml file, some strings are quoted, others are not:

regions:
  header: Header
  primary_menu: 'Primary menu'
  secondary_menu: 'Secondary menu'
  hero: 'Hero (full width)'
  highlighted: Highlighted
  breadcrumb: Breadcrumb
  social: Social Bar
  content_above: Content Above
  content: Content
  sidebar: 'Sidebar'
  content_below: 'Content Below'
  footer_top: 'Footer Top'
  footer_bottom: 'Footer Bottom'

From https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/themes/olive...

The rules for strings in YAML are complicated, but since you don't need to quote a string, as long as the first character is not a special character, maybe we should just remove them for consistency? For more, see:

Proposed resolution

Remove all single quotes in olivero.info.yml.

Remaining tasks

  • Decide if removing all quotes is a good idea, or if alternatively all strings should be quoted?
  • Update Creating sub-themes documentation page, depending on the decision.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3278144

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ressa created an issue. See original summary.

ressa’s picture

Issue summary: View changes
ressa’s picture

Title: Quote names in regions section » Quote names in regions section, perhaps also name, type, and package strings
Issue summary: View changes
ressa’s picture

Title: Quote names in regions section, perhaps also name, type, and package strings » Remove quotes from olivero.info.yml
Issue summary: View changes
ressa’s picture

Issue summary: View changes
quietone’s picture

Just noting that there are no Drupal coding standards for yaml files. I recall reading in some issue somewhere that the yml in that issue was quoted in the same way as exported from configuration management. I have not tested that.

I am curious to know why this was tested against so many environments.

Chi’s picture

ressa’s picture

Thanks for the clarification @quietone, and @Chi for the issue link, I have added a comment there about expanding YAML string coding standards.

I am also puzzled by all the tests. It looks like they were triggered 2 May 2022 at 04:18 CEST by manojkumar1997 ...

The failing test in the "main test" PHP 8.1 & MySQL 5.7 29,741 is the golden oldie false positive from QuickEdit: "WebDriver\Exception\UnknownError: element click intercepted: Element ... is not clickable at point" I also posted about in https://www.drupal.org/project/drupal/issues/3227033#comment-14501046.

ressa’s picture

ressa’s picture

Actually, it has been a blessing in disguise that all the tests were triggered, since it shows the randomness of the tests, and all the false positives it gives.

I have been trying to get the test to pass, and not break with a Quickedit false positive (third run now).

Pass

  • PHP 7.3 & PostgreSQL 10.12
  • PHP 7.4 & MySQL 5.7
  • PHP 8.1 & pgsql-10.12

Fail

Quickedit.Quickedit

WebDriver\Exception\UnknownError: element click intercepted: Element ... is not clickable at point

  • PHP 7.3 & MariaDB 10.3.22
  • PHP 7.3 & MySQL 5.7
  • PHP 7.3 & SQLite 3.28
  • PHP 8.0 & MySQL 5.7
  • PHP 8.1 & MySQL 5.7

Ckeditor5.Ckeditor5

Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest::testViewMode with data set "with alignment"

  • PHP 7.4 & SQLite 3.27
  • PHP 8.1 & sqlite-3.27

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Gauravvvv’s picture

Status: Active » Needs review
FileSize
1.21 KB

I have removed the quotes from olivero.info.yml file. please review

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Tested MR 2205 as it still applies to 10.1 and quotes are removed.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 15: 3278144-15.patch, failed testing. View results

ressa’s picture

I attempted rebasing, but there were too many changes, after the failing test.

If I click "Create new branch", it won't let me create a new branch, I get a "Failed to create branch '3278144-remove-quotes': invalid reference name '10.1.x'" error ...

Update: See #3323320: Can not create new branches on issue forks 10.1.x branch.

Akshay kashyap’s picture

Providing Patch

Akshay kashyap’s picture

Status: Needs work » Needs review
Rinku Jacob 13’s picture

Hi @Akshay kashyap, in your patch you have removed quotes from regions. But we have to remove quotes from description and alt_text key.Created new patch for that. Please review.

Rinku Jacob 13’s picture

The last submitted patch, 20: 3278144-20.patch, failed testing. View results

The last submitted patch, 22: 3278144-22.patch, failed testing. View results

Akshay kashyap’s picture

FileSize
69.34 KB

I have reviewed patch #22. Quotes removed from olivero.info.yml please see the screenshot

Rinku Jacob 13’s picture

Santosh_Verma’s picture

Applied patch #27 cleanly. quotes removed

Before
before

after
after

Santosh_Verma’s picture

Status: Needs review » Reviewed & tested by the community

  • lauriii committed ae8b400b on 10.1.x
    Issue #3278144 by ressa, Rinku Jacob 13, Akshay kashyap, Gauravvvv:...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Reviewed this with @nod_, @justafish, and @ckrina!

Committed ae8b400 and pushed to 10.1.x. Thanks!

ressa’s picture

Thanks! Nice to see Claro also getting cleaned up in #3350058: Remove quotes from claro.info.yml.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.