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
Comment | File | Size | Author |
---|---|---|---|
#28 | Screenshot 2023-03-27 at 3.11.29 PM.png | 177.73 KB | Santosh_Verma |
#28 | Screenshot 2023-03-27 at 3.08.23 PM.png | 187.75 KB | Santosh_Verma |
#26 | after-patch-apply.png | 69.34 KB | Akshay kashyap |
#22 | 3278144-22.patch | 1.21 KB | Rinku Jacob 13 |
| |||
#22 | 3278144-22.patch | 1.21 KB | Rinku Jacob 13 |
Issue fork drupal-3278144
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:
- 3278144-quote-names-in changes, plain diff MR !2205
Comments
Comment #3
ressa CreditAttribution: ressa at Ardea commentedComment #4
ressa CreditAttribution: ressa at Ardea commentedComment #5
ressa CreditAttribution: ressa at Ardea commentedComment #6
ressa CreditAttribution: ressa at Ardea commentedComment #7
quietone CreditAttribution: quietone at PreviousNext commentedJust 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.
Comment #8
Chi CreditAttribution: Chi commentedComment #9
ressa CreditAttribution: ressa at Ardea commentedThanks 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.
Comment #10
ressa CreditAttribution: ressa at Ardea commentedAll test options also seem to have been activated by this user in these two issues:
Comment #11
ressa CreditAttribution: ressa at Ardea commentedActually, 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
Fail
Quickedit.Quickedit
WebDriver\Exception\UnknownError: element click intercepted: Element ... is not clickable at point
Ckeditor5.Ckeditor5
Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest::testViewMode with data set "with alignment"
Comment #15
Gauravvvv CreditAttribution: Gauravvvv at Axelerant for Drupal India Association commentedI have removed the quotes from
olivero.info.yml
file. please reviewComment #16
smustgrave CreditAttribution: smustgrave at Mobomo commentedTested MR 2205 as it still applies to 10.1 and quotes are removed.
Comment #19
ressa CreditAttribution: ressa at Ardea commentedI 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.
Comment #20
Akshay kashyap CreditAttribution: Akshay kashyap as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedProviding Patch
Comment #21
Akshay kashyap CreditAttribution: Akshay kashyap as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedComment #22
Rinku Jacob 13 CreditAttribution: Rinku Jacob 13 commentedHi @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.
Comment #23
Rinku Jacob 13 CreditAttribution: Rinku Jacob 13 commentedComment #26
Akshay kashyap CreditAttribution: Akshay kashyap as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedI have reviewed patch #22. Quotes removed from olivero.info.yml please see the screenshot
Comment #27
Rinku Jacob 13 CreditAttribution: Rinku Jacob 13 commentedComment #28
Santosh_Verma CreditAttribution: Santosh_Verma at Srijan | A Material+ Company for Drupal India Association commentedApplied patch #27 cleanly. quotes removed
Before
after
Comment #29
Santosh_Verma CreditAttribution: Santosh_Verma at Srijan | A Material+ Company for Drupal India Association commentedComment #31
lauriiiReviewed this with @nod_, @justafish, and @ckrina!
Committed ae8b400 and pushed to 10.1.x. Thanks!
Comment #32
ressa CreditAttribution: ressa at Ardea commentedThanks! Nice to see Claro also getting cleaned up in #3350058: Remove quotes from claro.info.yml.