Comment support

Created on 7 March 2023, over 1 year ago
Updated 15 June 2023, over 1 year ago

Problem/Motivation

Provide a default support of the Core Comment module.

Feature request
Status

Fixed

Version

5.0

Component

Code

Created by

🇫🇷France Grimreaper France 🇫🇷

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷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
  • 🇫🇷France Grimreaper France 🇫🇷

    See screenshots for Olivero and current MR result.

  • Status changed to Needs work over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷
  • Assigned to mapac
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • Issue was unassigned.
  • Status changed to Fixed over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷
  • 🇫🇷France Grimreaper France 🇫🇷

    Logged in as admin:

    As an anonymou user:

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024