- 🇫🇷France Grimreaper France 🇫🇷
On my Website, I use panel for comments:
In Bootstrap 5, like for fieldsets in ✨ details and fieldsets form elements Fixed , I think we should use card, which is the successor of Bootstrap 3's panels.
Here is the code of comment.html.twig on my website:
{% set classes = [ 'comment', 'js-comment', status != 'published' ? 'comment--' ~ status, comment.owner.anonymous ? 'by-anonymous', author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', 'panel', 'panel-default', ] %} <article{{ attributes.addClass(classes) }}> {# Hide the "new" indicator by default, let a piece of JavaScript ask the server which comments are new for the user. Rendering the final "new" indicator here would break the render cache. #} <mark class="hidden" data-comment-timestamp="{{ new_indicator_timestamp }}"></mark> <footer class="panel-heading"> {# Indicate the semantic relationship between parent and child comments for accessibility. The list is difficult to navigate in a screen reader without this information. #} {% if parent %} <p class="visually-hidden">{{ parent }}</p> {% endif %} {# p:last-child has a specific behavior. #} <p>{{ submitted }} - {{ permalink }}</p> </footer> <div{{ content_attributes.addClass('panel-body') }}> {% if title %} {{ title_prefix }} <h3{{ title_attributes }}>{{ title }}</h3> {{ title_suffix }} {% endif %} {{ content }} </div> </article>
I also have a little bit of additional CSS (SASS):
section { &.comments { .panel { &:last-child { // Revert panel:last-child rule. margin-bottom: $line-height-computed; } } .indented { margin-left: 20px; } .comment { h3 { margin-top: 0; } } } }
Need to see if this is still needed. If we should remove core css with a libraries-override too.
- Assigned to mapac
- @mademo opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 4:55pm 14 June 2023 - 🇫🇷France Grimreaper France 🇫🇷
See screenshots for Olivero and current MR result.
- Status changed to Needs work
over 1 year ago 9:42am 15 June 2023 - Assigned to mapac
- Status changed to Needs review
over 1 year ago 9:44am 15 June 2023 - Status changed to Needs work
over 1 year ago 9:44am 15 June 2023 -
Grimreaper →
committed 8c613c17 on 5.0.x authored by
mademo →
Issue #3346449 by mademo, Grimreaper, pdureau: Comment support
-
Grimreaper →
committed 8c613c17 on 5.0.x authored by
mademo →
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 5:11pm 15 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.