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.
In the new module page we're collapsing the description and details for a module. It's a custom implementation and should be using the details element since that's exactly what it's made for.
The patch is pretty ugly, it's the quick and dirty version of what needs to be done for using details, it needs CSS cleanup, and proper use of the details form element.
Bonus, it removes a JS file since we're now using the same implementation as the rest of core for this. No idea why I haven't thought about it before.
Commit message:
Issue #1893072 by nod_, nagwani, Pete B: Use details element on module page.
Comment | File | Size | Author |
---|---|---|---|
#21 | Screen Shot 2013-07-02 at 21.37.57.png | 48.96 KB | saki007ster |
#21 | Screen Shot 2013-07-02 at 21.38.17.png | 43.13 KB | saki007ster |
#21 | Screen Shot 2013-07-02 at 21.38.37.png | 65.41 KB | saki007ster |
#21 | Screen Shot 2013-07-02 at 21.38.52.png | 68.11 KB | saki007ster |
#21 | Screen Shot 2013-07-02 at 21.51.18.png | 156.25 KB | saki007ster |
Comments
Comment #1
webchickHow bad does it look?
Comment #2
webchickAlso looping in the UX team.
Comment #3
nod_Pretty bad :þ
Comment #4
nod_Comment #5
webchickLOL that is "awesome" :P
Comment #6
nod_It's like a teenager putting on makeup for the first time. It's all over the place.
Comment #7
Wim LeersHAHAHHAHAHAHAHA :D
Comment #8
Bojhan CreditAttribution: Bojhan commentedOh, details. Anyways, following but consider it RTBC when it doesn't change anything visual (make sure you check all the wierdness around hover/selection).
Comment #9
nod_Reality check :)
Comment #10
droplet CreditAttribution: droplet commentedOnly one desktop browser, the chrome supports it.
Comment #11
nod_we have a fallback, and a polyfill should be used by the time D8 ships #1839158: Replace collapse.js with a proper polyfill for <details>.
Comment #12
Pete B CreditAttribution: Pete B commentedPatch to match the style of the original page using the new element.
Comment #13
Pete B CreditAttribution: Pete B commentedSet needs review
Comment #14
nod_Real nice, thanks!
Styling almost there, still a
#system-modules .description { cursor: pointer }
that should be removed. And thesystem.module.js
file and the declaration removed fromsystem_library_info()
for this file.Comment #15
nod_Closed #1898354: minimize module page's Description click area for this one. After the above comments are addressed this is RTBC for me.
( edit ) From the other issue
nagwani
should be credited for the patch too.Comment #15.0
nod_give comit message
Comment #16
Pete B CreditAttribution: Pete B commentedHi nod_,
Thanks a lot for the feedback. I have addresses the cursor pointer issue.
We actually still need system.modules.js because it is handling the search functionality, which needs to stay.
As an aside, I think we might need to start another issue to get test coverage for the module search, because patches #0 and #12 broke it and the test bot didn't notice?
I've fixed it now, and have removed the deprecated code from system.modules.js
Thanks,
Pete
Comment #17
nod_cool, i'll have a look. We can't test JS in core just yet. We rely on the fat module. So if we want to make sure it works, we need to write tests in that module.
Comment #18
nod_cool, i'll have a look. We can't test JS in core just yet. We rely on the fat module. So if we want to make sure it works, we need to write tests in that module.
Comment #19
nod_Made a couple of changes. took out a couple of CSS rules, minor change in the JS to avoid reselecting something we already selected, added an ID to the details element (otherwise we end up with
<a>
links with no href and i don't want that :p).For the future, you don't need post a patch with commented CSS code, or JS or PHP actually. We can see in the diff what's taken out.
Comment #20
Pete B CreditAttribution: Pete B commentedReroll against latest core.
Thanks,
Pete
Comment #21
saki007sterTested this patch manually. Working fine for chrome,mozilla,safari,IE9 and mobile
Attaching screenshots for the reference.
Comment #22
nod_sounds like RTBC to me :)
Comment #23
Bojhan CreditAttribution: Bojhan commentedComment #24
catchCommitted/pushed to 8.x, thanks!
Comment #25.0
(not verified) CreditAttribution: commentedname typo