Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Seven transforms all details summaries to uppercase. The Simpletest results form shows class names as details summaries.
Uppercased class names are very hard to read.
Status quo:
Proposed resolution
Remove the uppercasing for the Simpletest results form.
Result:
Remaining tasks
User interface changes
Class names on the Simpletest results form are no longer uppercased.
Comments
Comment #1
LewisNymanComment #2
LewisNymanThanks for raising this issue. I didn't notice this.
We should write this class in a way that is reusable, something like .summary--camel-case? Then other modules can use this if they also display camel cased strings in summaries.
Maybe this would look better using small caps? It looks a little weird now https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant#Examples
Comment #3
tim-dielsAssigning this to me as part of the Drupal Code Sprint.
Comment #4
tim-dielsComment #5
tim-dielsI've added the summary.summary-camel-case class that can be used in other modules.
Result:
Comment #6
LewisNymanThanks!
Can we remove the old class and insert that class in to the summary? Then we wouldn't need to have both.
Also, we can remove the element from the selector and just have .summary--camel-case
Comment #7
LewisNymanNovice task
Comment #10
alvar0hurtad0Previous patch now (with the new file structure) don't apply.
this new one applies and solves the problem.
Comment #11
LewisNymanhmm I'd still rather not use IDs, classes are better, a reusable class is great.
Comment #12
alvar0hurtad0Comment #13
alvar0hurtad0Ups,
I forgot the status
Comment #14
jOksanen CreditAttribution: jOksanen commentedTaking this up, fixing the whitespace and reviewing.
Comment #15
jOksanen CreditAttribution: jOksanen commentedAdded a whitespace to keep the CSS format correct, and reviewed the patch by running tests.
Comment #16
jOksanen CreditAttribution: jOksanen commentedComment #17
lduerig CreditAttribution: lduerig commentedTested, works in lowercase.
Comment #18
lduerig CreditAttribution: lduerig commentedComment #19
LewisNymanhm, so patch #5 had styling like this:
But now patch #15 has styling like this?
Can we also use the summary--camel-case class? I'm happy to help to show how we will add the class to the right elements
Comment #20
lduerig CreditAttribution: lduerig commentedHere's a new patch with both classnames
Comment #21
lduerig CreditAttribution: lduerig commentedComment #22
jOksanen CreditAttribution: jOksanen commentedYes, my bad. The latest one seems to be correct.
Comment #23
jOksanen CreditAttribution: jOksanen commentedSetting as RTBC.
Comment #24
LewisNymanThanks, we are still using the previous styling, I think the styling with the small caps is good (see #5).
I would love it if we could do two tother things:
1. Remove the
summary
fromsummary.summary--camel-case
as it is not needed2. Remove
.simpletest-results-form summary
and then apply the.summary--camel-case
to the simple test summary elements. This will involve some php but we can do that after the other stuffComment #25
Outi CreditAttribution: Outi commentedSo this is a patch with the small-caps font-variant and only the .summary--camel-case class, but the .summary--camel-case class hasn't yet been applied to the simple test summary elements.
Comment #26
LewisNymanWorking on adding the class
Comment #27
LewisNymanOk I added this class to only simpletest summary elements. I'm not sure if I'm checking the right variable though.
Comment #29
LewisNymanGo tests!
Comment #30
alvar0hurtad0I works fine for me
Comment #31
tstoecklerMinor:
if( isset... -> if (isset...
(Can maybe be fixed during commit?!)
Also noting that in light of all the "move classes in X from preprocess to templates" issues it would be possible to make simpletest use a "details--simpletest-result-summary" theme suggestion for the given details element. I personally think that would be a bit too specific but I'm also not really involved in that initiative.
Thus, leaving at RTBC. Thanks everyone for the hard work on this!
Comment #32
alexpottBut the second part that is all has no caps looks weird with the
font-variant: small-caps;
- why are we doing this? Also it is not camel case - our class names areDrupal\user\Tests\UserPasswordResetTest
- not that \user\ is not camel case.Comment #33
dinarcon CreditAttribution: dinarcon commentedBased on @alexpott comment in #32 and making the suggested change in the original report, we can apply @jOksanen suggestion in #15. The patch no longer applies. This needs a reroll.
Result:
Comment #34
psebborn CreditAttribution: psebborn commentedAfter speaking with dinarcon during Core Mentoring hours, I'll look at getting this reroll done tonight.
Comment #35
psebborn CreditAttribution: psebborn commentedRerolled patch from #15.
Conflicted in merge, where a comment had been added since. I changed the order so the comment related to the CSS below..
Comment #36
psebborn CreditAttribution: psebborn commentedComment #37
tim-dielsI tested this and seems ok to me + Screenshot attached.
Anyone else can say if it's fine?
Result:
Comment #38
LewisNymanSounds good, not a perfect solution but at least we fix this bug.
Comment #39
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed f8bf34c and pushed to 8.0.x. Thanks!