Problem/Motivation
See meta issue: #1980004: [meta] Creating Dream Markup
Proposed resolution
Update according to the standards in the meta issue.
Remaining tasks
- DONE Replace un-semantic classes like "text" and overly-specific classes like "update-description-prefix" with better ones as described in #1980004: [meta] Creating Dream Markup.
- DONE Update CSS selectors to match these changes.
User interface changes
None.
API changes
Class name changes.
Beta phase evaluation
Issue category | Task because is part of completing changes laid out in meta issue #1980004: [meta] Creating Dream Markup |
---|---|
Unfrozen changes | Unfrozen because only CSS and markup are changed. |
Comment | File | Size | Author |
---|---|---|---|
#40 | admin-reports-translations-EXPANDED.png | 90.05 KB | andythomnz |
#40 | admin-reports-translations-COLLAPSED.png | 57.31 KB | andythomnz |
#40 | admin-reports-translations-check-EXPANDED.png | 96.94 KB | andythomnz |
#40 | admin-reports-translations-check-COLLAPSED.png | 63.32 KB | andythomnz |
#40 | interdiff.txt | 549 bytes | andythomnz |
Comments
Comment #1
oresh CreditAttribution: oresh commentedmoving to core issues.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedI have to admit, I was responsible for this. But ... I did not invent this markup. Both the markup and the accompanied JavaScript are based on the Modules page.
This class is used in the JavaScript (locale.admin.js) that toggles the visibility of update details. This class was also derived from the class used on the Module page.
If we find a solution here, we may apply that to the Module page too.
Comment #3
Sutharsan CreditAttribution: Sutharsan commentedRelated:
#1987410: [meta] system.module - Convert theme_ functions to Twig converts
theme_system_modules_details
to twig template. That is the function which outputs the module details on the module page.Comment #4
BarisW CreditAttribution: BarisW commentedHere's a patch for the proposed markup. The only difference is that it uses 'visually-hidden' instead of 'element-invisible'.
Comment #6
herom CreditAttribution: herom commented#4: locale-markup-1982230-4.patch queued for re-testing.
Comment #8
herom CreditAttribution: herom commentedreroll.
Comment #9
cilefen CreditAttribution: cilefen commentedReroll.
There are selectors in the CSS file such as:
That need updating.
Comment #10
cilefen CreditAttribution: cilefen commentedComment #11
cilefen CreditAttribution: cilefen commentedComment #12
Sutharsan CreditAttribution: Sutharsan commentedCilifen's patch in #9 is a good step forward. Please proceed with update of the CSS selectors.
Comment #13
Sutharsan CreditAttribution: Sutharsan commentedComment #14
LewisNymanThis markup is an improvement, I don't think it's totally inline with our CSS standards though. I'll find more time to go over the markup and what it's doing and try and make suggetions.
Comment #15
LewisNymanThis can be .update__prefix
.update__wrapper
update__message
update__details
Comment #16
cilefen CreditAttribution: cilefen commentedFirst, a reroll.
Comment #17
cilefen CreditAttribution: cilefen commentedThis incorporates the class name changes from #15. I see that I missed a class name on the reroll, but it is fixed in this patch.
Comment #18
holist CreditAttribution: holist commentedWorking on this.
Comment #19
holist CreditAttribution: holist commentedEdited CSS to match the changes made to template and JS previously.
Comment #20
LewisNymanThanks this is looking better. I would like to find out if we can remove the other parts of the selector so we can make it a lot shorter and weaker?
Comment #21
holist CreditAttribution: holist commentedI dropped some classes from the selectors and the "expand" class from the markup as nothing seemed to target it. On the CSS, .expanded I don't think we can drop (because of JS interaction) and I'm also somewhat uncomfortable dropping the form id from the selector... But will listen if someone wants to talk me into it!
Comment #22
LewisNymanThanks. This is looking a lot better. We just need to get rid of that ID. In an ideal world we could only have one class, what if we change the '.update' part to '.locale-translation-update' so we would have classes like '.locale-translation-update__wrapper' etc?
Comment #23
LewisNymanComment #24
holist CreditAttribution: holist commentedNow with compacted selectors.
Comment #25
LewisNymanWe need someone to manual test the patch just to make sure we haven't introduced visual regressions.
I just noticed that these selectors used to be different and now they are the same. Is this ok? If it is we should merge them
Comment #26
holist CreditAttribution: holist commented@LewisNyman no that belongs to an another form. Reverted that line.
Comment #27
holist CreditAttribution: holist commentedChanging to Needs work for the manual testing.
Comment #28
LewisNyman@holist In that case can we add a better class to that element as well?
Comment #29
vermario CreditAttribution: vermario commentedI did some manual testing with the patch at #26 and I did not see any regression or strange behaviour.
Comment #30
vermario CreditAttribution: vermario commentedSetting to reviewed, removing the manual testing tag.
Comment #31
holist CreditAttribution: holist commented@LewisNyman, I now looked into the ".locale-translate-filter-form .details-wrapper" part of this dives straight into form API, I don't really think we want to go there in this issue. (I was too caught up in the work I actually get paid for the past month so I have neglected this...)
So maybe this one is as far as it gets for now?
Comment #32
LewisNyman@holist That sounds like a good idea. There are a few frontend issue that get caught up on one, small, really hard to change, part of the mark up and they never make it in.
Let's create a follow up for that small part.
RTBC++
Comment #33
alexpott@vermario if you do manual testing can you please add screenshots.
This issue is a normal task so we need to outline how it fits within the allowable Drupal 8 beta criteria. Can someone add Drupal 8 beta phase evaluation template to the issue summary. This is a markup change so it is allowed but it is good to get this documented on the issue - so I don't have to this when it comes to commit time.
#32 mentions a followup - could this be created too? Thanks.
Comment #34
holist CreditAttribution: holist commentedI added the beta evaluation table.
@LewisNyman I fear it is not going to be a small issue to change what classes Form API creates?
Comment #35
Gábor HojtsyCan someone help with the screenshots?
Comment #36
andythomnz CreditAttribution: andythomnz commentedThis is how I went about preparing my drupal environment:
- Standard installation running on Ubuntu server
- Installed the patch, and enabled German as an additional language
- Used Chromium browser on Ubuntu and took screenshots
Not sure exactly what you're looking for, but hopefully these screenshots will be of some use.
This is my 3rd contribution to Drupal core :-)
Comment #37
Gábor Hojtsy@andythomnz: thanks for the screenshots, the relevant ones are the last two, but we would need some modules to update translations for (grab a few contributed modules, so you see something here). The rest belong to pages that are not changed.
Reviewed the code also:
You did not actually modify anything to have an "update__prefix" class, did you?
I also noticed you removed the 'expand' class. I sense that may have been there to support the expand/collapse feature. Does it work without that? (To verify that it is important to screenshot this as explained at the start of my comment above).
Comment #38
holist CreditAttribution: holist commented@Gábor Hojtsy, good catch on the "update_prefix", it should be ".locale-translation-update__prefix" indeed. I will post a new version of the patch ASAP.
On the "expand" class, I did not notice any change in functionality when trying out the patch and I did review the code if it was used and didn't find any references. The functionality seems to be attached to the class "expanded".
Comment #39
andythomnz CreditAttribution: andythomnz commentedThanks Gábor for your guidance, I will attempt to re-roll the patch shortly....
Comment #40
andythomnz CreditAttribution: andythomnz commented@Gábor Hojtsy,
I got a couple of modules to update translations for, and have re-done the screenshots (attached) for the last 2 pages. Also, there are 2 screenshots of each page, one showing it expanded, and the other collapsed. I have not removed the 'expand' class, however the screenshots evidence that it still works.
As for the "update__prefix" class, I have changed the name of the class in the file
/core/modules/locale/locale.admin.js
to ".locale-translation-update__prefix" so that the class names in the file/core/modules/locale/templates/locale-translation-update-info.html.twig
remain conventional.Comment #41
Gábor HojtsyMakes sense for me and was in part reviewed by @LewisNyman before. So let's get it :) BTW the escaped strings are to be resolved in #2319233: Double escaped string on Available translation update page once committed :)
Comment #42
LewisNymanGreat work everyone, maybe we can create an issue to look over the CSS as a child of #1995272: [Meta] Refactor module CSS files inline with our CSS standards?
Comment #43
alexpottCommitted 978116e and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the summary.
Comment #44
Gábor HojtsySuperb, thanks all!