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.
Meta issue: #1980004: [meta] Creating Dream Markup
Issue based on: #1939100: Convert theme_progress_bar() to Twig
Questions:
Why we are using classes lide .bar .message, when they tell nothing about our module?
Why use div for text wrapping?
Markup proposal:
<div id="progress" class="progress">
<div class="progress-bar">
<div class="progress-filled" style="width: {{ percent }}%;"></div>
</div>
<p class="progress-percentage">{{ percent }}%</p>
<p class="progress-message">{{ message }}</p>
</div>
Comment | File | Size | Author |
---|---|---|---|
#6 | progress-bar.png | 328.3 KB | rteijeiro |
#5 | 1982220-progress-bar-dreammarkup.patch | 4.58 KB | Karmen |
Comments
Comment #1
oresh CreditAttribution: oresh commentedmoving issue to core.
Comment #2
LewisNymanRELATED: #1989480: Progress Bar style update
Comment #3
ry5n CreditAttribution: ry5n commentedMarkup from #1989480: Progress Bar style update, with notes and room for improvement:
BTW, this is how it looks with Seven theme styles and a small variant: http://drupalcode.org/sandbox/ry5n/1932040.git/blob_plain/HEAD:/patterns...
Comment #4
star-szrTagging.
Comment #5
Karmen CreditAttribution: Karmen commentedI've changed the markup of the template according with the suggested markup. I've left the id because it was needed in js.
Be nice! It's my first contribution!
Comment #6
rteijeiro CreditAttribution: rteijeiro commentedIt's a RTBC for me. Progress bar looks shiny and markup seems to be right.
Congrats @Karmen for your first patch!!
Comment #7
LewisNymanIt looks like the markup in the first post is out of date? The suggestions in #103 looks more inline with our standards to me?
Comment #8
rteijeiro CreditAttribution: rteijeiro commented@LewisNyman what are the suggestions? Do you mean in this issue #1989480: Progress Bar style update ?
Comment #9
LewisNymanYeah it looks like the markup that was implemented there is pretty close to what we want
Comment #10
nod_Don't forget the tag :)
Comment #11
Dragan Eror CreditAttribution: Dragan Eror commentedHere is some additional style improvement for progress bar... #2254785: Progress bar 0% or over 100% visual BUG
Comment #12
LewisNymanI'm going to close this issue as it predates #1989480: Progress Bar style update which changed the default mark up. If someone still feel like the mark up needs improving then please reopen this issue and update the issue summary.