#3360 update pull request page
Merged 5 years ago by ryanlerch. Opened 5 years ago by ryanlerch.
ryanlerch/pagure pullrequest-page  into  master

file modified
+5 -5
@@ -341,11 +341,11 @@ 

  TRIGGER_CI = ['pretty please pagure-ci rebuild']

  

  FLAG_STATUSES_LABELS = {

-     'success': 'label-success',

-     'failure': 'label-danger',

-     'error': 'label-danger',

-     'pending': 'label-info',

-     'canceled': 'label-warning',

+     'success': 'badge-success',

+     'failure': 'badge-danger',

+     'error': 'badge-danger',

+     'pending': 'badge-info',

+     'canceled': 'badge-warning',

  }

  FLAG_SUCCESS = 'success'

  FLAG_FAILURE = 'failure'

file modified
+15 -7
@@ -181,10 +181,8 @@ 

  

  #preview

  {

-     min-height: 16rem;

-     background:#efefef;

+     min-height: 12rem;

      padding:1em;

-     border:1px solid #aaa;

  }

  

  .form-control#initial_comment
@@ -598,10 +596,6 @@ 

    cursor: pointer;

  }

  

- .pr-changes-description

- {

-   font-size: 0.8em;

- }

  

  .readme dd{

    margin-left:2em;
@@ -808,3 +802,17 @@ 

  .progress-bar{

    height: inherit;

  }

+ 

+ .text-semimuted{

+   color:#555!important;

+ }

+ 

+ .font-size-09{

+   font-size:0.9em;

+ }

+ 

+ .autogenerated-comment p{

+   margin-bottom:0;

+ }

+ 

+ 

@@ -108,21 +108,74 @@ 

  

  

  {% macro show_comment(comment, id, repo, username, issueid, form) %}

- <div class="card mb-3 clearfix">

-   <div id="comment-{{ id }}" class="card-header">

-     {{ comment.user.default_email | avatar(16) | safe }}

-     <a href="{{ url_for('ui_ns.view_user', username=comment.user.user)}}"

-         title="{{ comment.user.html_title }}">

-       {{ comment.user.user }}

-     </a>

-     <a class="headerlink float-right" title="Permalink to this headline"

-       href="#comment-{{ id }}">

-       <span title="{{

-         comment.date_created | format_datetime

-         }}">{{ comment.date_created | humanize}}</span>

-     </a>

+ <div class="card mb-4 clearfix">

+   <div id="comment-{{ id }}" class="card-header bg-light d-flex align-items-center px-3 py-2">

+     <div>

+         {{ comment.user.default_email | avatar(24) | safe }}

+         <a href="{{ url_for('ui_ns.view_user', username=comment.user.user)}}"

+             title="{{ comment.user.html_title }}"

+             class="notblue font-weight-bold text-semimuted">

+             {{ comment.user.user }} 

+         </a>

+         <a class="notblue text-semimuted" title="Permalink to this headline"

+           href="#comment-{{ id }}">

+           <span title="{{

+             comment.date_created | format_datetime

+             }}">commented {{ comment.date_created | humanize}}</span>

+         </a>

+     </div>

+     <div class="issue_actions ml-auto">

+         <div class="issue_action icon">

+           <div class="btn-group" role="group" aria-label="Basic example">

+ 

+             {% if id != 0 and g.fas_user %}

+               {% if config.get('REACTIONS') %}

+               <div class="btn-group dropdown">

+                 <button class="btn btn-outline-primary border-0" type="button" data-toggle="dropdown" title="Add reaction">

+                     <span class="fa fa-heart"></span>

+                 </button>

+                 <div class="dropdown-menu reaction-picker" data-comment-id="{{ comment.id }}">

+                   {% for label, emoji in config.get('REACTIONS') %}

+                   <button class="btn btn-outline-secondary border-0 btn-sm" type="button" title="{{ label }}">

+                       <span class="{{ emoji }}"></span>

+                   </button>

+                   {% endfor %}

+                 </div>

+               </div>

+               {% endif %}

+             {% endif%}

+                   

+ 

+             {% if g.fas_user %}

+               <a class="reply btn btn-outline-primary border-0" data-toggle="tooltip"

+                   title="Reply to this comment - lose formatting" href="javascript:void(0)">

+                 <span class="fa fa-share-square-o" title="Reply to this comment"></span>

+               </a>

+             {% endif %}

+             {% if id != 0 and g.fas_user and (g.repo_committer or (

+               comment.parent.status in [True, 'Open']

+               and g.fas_user.username == comment.user.username)) %}

+             <a class="btn btn-outline-primary border-0 edit_btn" href="{{

+                 '%s/comment/%s/edit' % (request.base_url, comment.id) }}"

+                 data-comment="{{ comment.id }}" data-objid="{{ issueid }}">

+               <i class="fa fa-pencil"  title="Edit comment"></i>

+             </a>

+             {% endif %}

+             {% if id != 0 and g.fas_user and (g.repo_committer or (

+                 comment.parent.status in [True, 'Open']

+                 and g.fas_user.username == comment.user.username)) %}

+             <button class="btn btn-outline-primary border-0" type="submit"

+                 name="drop_comment" value="{{ comment.id }}"

+                 onclick="return confirm('Do you really want to remove this comment?');"

+                 title="Remove comment">

+               <i class="fa fa-trash"></i>

+             </button>

+             {% endif %}

+           </div>

+         </div>

+       </div>

    </div>

-   <div class="card-body">

+   <div class="card-body pb-1">

      <section class="issue_comment">

        <div>

          <span class="edit_date" title="{{
@@ -138,69 +191,104 @@ 

          </span>

        </div>

      </section>

-     <div class="issue_actions mt-2">

-       {% if comment.edited_on %}

-           <small class="text-muted">Edited {{ comment.edited_on | humanize }} by {{ comment.editor.username }} </small>

-       {% endif %}

-       <div class="issue_reactions float-left pb-1" data-comment-id="{{ comment.id}}">

-         <div class="btn-group">

-           {% for r in comment.reactions | sort %}

-           <button class="btn btn-outline-secondary btn-sm"

-                   type="button"

-                   data-toggle="tooltip"

-                   title="{{ r }} sent by {{ comment.reactions[r] | join_prefix(10) }}">

-               <span class="{{ config.get('_REACTIONS_DICT', {})[r] }}"></span>

-               <span class="count">{{ comment.reactions[r] | length }}</span>

-           </button>

-           {% endfor %}

-         </div>

+   </div>

+   <div class="card-footer bg-transparent d-flex align-items-center border-0 p-0">

+     {% if comment.edited_on %}

+     <div class="issue_actions ml-3">

+       <small class="text-semimuted">Edited {{ comment.edited_on | humanize }} by {{ comment.editor.username }} </small>

        </div>

-       <div class="issue_action icon float-right pb-1">

-         <div class="btn-group" role="group" aria-label="Basic example">

-           {% if id != 0 and g.fas_user %}

-             {% if config.get('REACTIONS') %}

-             <div class="btn-group dropup">

-               <button class="btn btn-outline-secondary btn-sm dropdown-toggle" type="button" data-toggle="dropdown" title="Add reaction">

-                   <span class="oi" data-glyph="heart"></span>

-                   <span class="caret"></span>

-               </button>

-               <div class="dropdown-menu reaction-picker" data-comment-id="{{ comment.id }}">

-                 {% for label, emoji in config.get('REACTIONS') %}

-                 <button class="btn btn-outline-secondary btn-sm" type="button" title="{{ label }}">

-                     <span class="{{ emoji }}"></span>

-                 </button>

-                 {% endfor %}

-               </div>

-             </div>

+     {% endif %}

+ 

+     <div class="issue_reactions ml-auto" data-comment-id="{{ comment.id}}">

+       <div class="btn-group">

+         {% for r in comment.reactions | sort %}

+         <button class="btn btn-outline-secondary btn-sm border-0"

+                 type="button"

+                 data-toggle="tooltip"

+                 title="{{ r }} sent by {{ comment.reactions[r] | join_prefix(10) }}">

+             <span class="{{ config.get('_REACTIONS_DICT', {})[r] }}"></span>

+             <span class="count">{{ comment.reactions[r] | length }}</span>

+         </button>

+         {% endfor %}

+       </div>

+     </div>

+   </div>

+ 

+ </div>

+ {% endmacro %}

+ 

+ {% macro show_pr_initial_comment(pull_request, repo, form, username) %}

+ <div class="card mb-3 clearfix">

+   {%if pull_request.initial_comment %}

+   <div id="comment-0" class="card-header bg-light d-flex align-items-center px-3 py-2">

+     <div>

+       {{ pull_request.user.default_email | avatar(24) | safe }}

+       <a href="{{ url_for('ui_ns.view_user', username=pull_request.user.user)}}"

+           title="{{ pull_request.user.html_title }}"

+           class="notblue font-weight-bold text-semimuted">

+         {{ pull_request.user.user }} 

+       </a>

+       <a class="notblue text-semimuted" title="Permalink to this headline"

+         href="#comment-0">

+         <span title="{{

+           pull_request.date_created | format_datetime

+           }}"> commented {{ pull_request.date_created | humanize}}</span>

+       </a>

+     </div>

+     <div class="issue_actions ml-auto">

+         <div class="issue_action icon">

+           <div class="btn-group" role="group" aria-label="Basic example">

+             {% if g.fas_user %}

+               <a class="reply btn btn-outline-primary border-0" data-toggle="tooltip"

+                   title="Reply to this comment - lose formatting" href="javascript:void(0)">

+                 <span class="fa fa-share-square-o" title="Reply to this comment"></span>

+               </a>

              {% endif %}

-             <a class="reply btn btn-outline-secondary btn-sm" data-toggle="tooltip"

-                 title="Reply to this comment - lose formatting">

-               <span class="fa fa-share-square-o text-muted" title="Reply to this comment"></span>

+             {% if g.fas_user and (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+             <a class="btn btn-outline-primary border-0" 

+                href="{{ url_for(

+                 'ui_ns.request_pull_edit',

+                 repo=repo.name,

+                 username=username,

+                 namespace=repo.namespace,

+                 requestid=pull_request.id) }}">

+               <i class="fa fa-pencil"  title="Edit comment"></i>

              </a>

-           {% endif %}

-           {% if id != 0 and g.fas_user and (g.repo_committer or (

-               comment.parent.status in [True, 'Open']

-               and g.fas_user.username == comment.user.username)) %}

-           <a class="btn btn-outline-secondary btn-sm edit_btn" href="{{

-               '%s/comment/%s/edit' % (request.base_url, comment.id) }}"

-               data-comment="{{ comment.id }}" data-objid="{{ issueid }}">

-             <i class="fa fa-pencil"  title="Edit comment"></i>

-           </a>

-           {% endif %}

-           {% if id != 0 and g.fas_user and (g.repo_committer or (

-               comment.parent.status in [True, 'Open']

-               and g.fas_user.username == comment.user.username)) %}

-           <button class="btn btn-outline-secondary btn-sm" type="submit"

-               name="drop_comment" value="{{ comment.id }}"

-               onclick="return confirm('Do you really want to remove this comment?');"

-               title="Remove comment">

-             <i class="fa fa-trash"></i>

-           </button>

-           {% endif %}

+             {% endif %}

+           </div>

          </div>

        </div>

-     </div>

    </div>

+   <div class="card-body">

+     <section class="issue_comment">

+       <div>

+         <span class="comment_text comment_body">

+           {{ pull_request.initial_comment | markdown | noJS | safe }}

+         </span>

+       </div>

+     </section>

+   </div>

+   {% else %}

+   <div class="card-header bg-light text-center p-3 border-0">

+     <span class="text-muted font-weight-bold">no initial comment</span>

+     {% if g.fas_user and (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+       <div>

+       {% if pull_request.status == 'Open' %}

+       <a class="btn btn-outline-primary mt-2 btn-sm" 

+         href="{{ url_for(

+           'ui_ns.request_pull_edit',

+           repo=repo.name,

+           username=username,

+           namespace=repo.namespace,

+           requestid=pull_request.id) }}">

+         add initial comment

+       </a>

+       {% endif %}

+       </div>

+       {% endif %}

+   </div>

+   {% endif %}

+ 

  </div>

  {% endmacro %}

  

file modified
+1 -1
@@ -134,7 +134,7 @@ 

                      <a href="{{ flag.url }}">{{ flag.username }}</a>

                    </span>

                    <div class="pull-xs-right">

-                     <span class="label {{ flag | flag2label }}">

+                     <span class="badge {{ flag | flag2label }}">

                        {{- flag.status -}}

                        {%- if flag.percent %} ({{ flag.percent }}%) {%- endif -%}

                      </span>

file modified
+473 -352
@@ -1,5 +1,5 @@ 

  {% extends "repo_master.html" %}

- {% from "_formhelper.html" import show_comment, render_bootstrap_field %}

+ {% from "_formhelper.html" import show_comment, show_pr_initial_comment, render_bootstrap_field %}

  

  {% block title %}

    {%- if pull_request -%}
@@ -26,127 +26,222 @@ 

  {% endblock %}

  

  {% block repo %}

- <div class="row" id="pr-wrapper">

-   <div class="col-md-12">

  {% if pull_request %}

- <h3><span class="label label-default">PR#{{requestid}}</span>

-   {% if pull_request.status != 'Open' and pull_request.status != 'Closed' %}

-   <span class="label {{'label-success' if pull_request.status == 'Merged' else 'label-danger'}}">{{pull_request.status}}</span>

-   {% endif %}

-   {{ pull_request.title | noJS(ignore="img") | safe}}

-   {% if g.authenticated and (g.fas_user.username == pull_request.user.username

-     or g.repo_committer) and pull_request.status == 'Open'%}

-      <span class="pull-xs-right">

-      {% if pull_request.status == 'Open' and g.authenticated and

-         (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

-           {% if mergeform and pull_request.remote %}

-             <form style="display:inline;" action="{{ url_for(

-               'ui_ns.refresh_request_pull', username=username,

-               namespace=repo.namespace,

-               repo=repo.name, requestid=requestid) }}" method="POST">

-                 <button type="submit" value="Refresh" id="refresh_pr"

-                         class="btn btn-warning btn-sm" title="Refresh the remote pull request">

-                   <span class="fa fa-refresh"></span>

-                 </button>

-                 {{ mergeform.csrf_token }}

+ <div class="d-flex align-items-start">

+     <h4 class="ml-1">

+         <div>

+             {% if pull_request.status == 'Open' %}

+               <span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>

+               <span class="text-success font-weight-bold">#{{requestid}}</span>

+             {% elif pull_request.status == 'Merged' %}

+               <span class="fa fa-fw text-info fa-arrow-circle-down pt-1"></span>

+               <span class="text-info font-weight-bold">#{{requestid}}</span>

+             {% elif pull_request.status == 'Closed' %}

+               <span class="fa fa-fw text-danger fa-arrow-circle-down pt-1"></span>

+               <span class="text-danger font-weight-bold">#{{requestid}}</span>

+             {% endif %}

+             <span class="font-weight-bold">

+                   {{ pull_request.title | noJS(ignore="img") | safe}}

+             </span>

+             {% if g.authenticated and (g.fas_user.username == pull_request.user.username

+               or g.repo_committer) and pull_request.status == 'Open'%}

+                   <a class="btn btn-sm btn-outline-secondary border-0"

+                      href="{{ url_for(

+                       'ui_ns.request_pull_edit',

+                       repo=repo.name,

+                       username=username,

+                       namespace=repo.namespace,

+                       requestid=requestid) }}"

+                      title="Update title"><i class="fa fa-pencil"></i></a>

+             {% endif %}

+         </div>

+         <div>

+           <small>

+           {% if pull_request.status == 'Open' %}

+             <span data-toggle="tooltip" title="{{pull_request.date_created | format_datetime}}">

+               <span class="text-success font-weight-bold">Opened</span> {{ pull_request.date_created |humanize }}

+             </span>

+             <span title="{{ pull_request.user.html_title }}"> by {{ pull_request.user.user }}.</span>

+             <span class="text-muted" data-toggle="tooltip" title="{{pull_request.last_updated | format_datetime}}">

+               Modified {{ pull_request.last_updated |humanize }}

+             </span>

+           {% elif pull_request.status == 'Merged' %}

+             <span data-toggle="tooltip" title="{{pull_request.closed_at | format_datetime}}">

+               <span class="text-info font-weight-bold">Merged</span> {{ pull_request.closed_at |humanize }}

+             </span>

+             by

+             <span title="{{ pull_request.user.html_title }}">{{ pull_request.user.user }}.</span>

+             <span class="text-muted" data-toggle="tooltip" title="{{pull_request.date_created | format_datetime}}">

+                 <span class="font-weight-bold">Opened</span> {{ pull_request.date_created |humanize }}

+             </span>

+             <span class="text-muted" title="{{ pull_request.user.html_title }}">by {{ pull_request.user.user }}.</span>

+           {% elif pull_request.status == 'Closed' %}

+             <span data-toggle="tooltip" title="{{pull_request.closed_at | format_datetime}}">

+               <span class="text-danger font-weight-bold">Cancelled</span> {{ pull_request.closed_at |humanize }}

+             </span>

+             by

+             <span title="{{ pull_request.user.html_title }}">{{ pull_request.user.user }}.</span>

+             <span class="text-muted" data-toggle="tooltip" title="{{pull_request.date_created | format_datetime}}">

+                 <span class="font-weight-bold">Opened</span> {{ pull_request.date_created |humanize }}

+             </span>

+             <span class="text-muted" title="{{ pull_request.user.html_title }}">by {{ pull_request.user.user }}.</span>

+           {% endif %}

+           </small>

+         </div>

+         <div class="mt-2">

+           <small>

+             {% if pull_request.remote_git or pull_request.project_from.is_fork %}

+             <span class="badge badge-light badge-pill border border-secondary" style="font-size:1em">

+               {% if pull_request.remote_git %}

+                 <i class="fa fa-globe"></i>

+                 {{pull_request.remote_git}}

+               {% elif pull_request.project_from.is_fork %}

+                 <i class="fa fa-code-fork"></i>

+                 {% if pull_request.project_from.namespace %}

+                   {{pull_request.project_from.namespace}}/

+                 {% endif %}

+                 {% if pull_request.project_from.is_fork -%}

+                   {{ pull_request.project_from.user.user }}/

+                 {%- endif -%}

+                 {{pull_request.project_from.name}}

+               {% endif %}

+               </span>

+             {% endif %}

+             <a href="{{ url_for('ui_ns.view_tree',

+                     repo=pull_request.project_from.name,

+                     username=pull_request.project_from.user.user

+                       if pull_request.project_from.is_fork else None,

+                     namespace=repo.namespace,

+                     branchname=pull_request.branch_from)

+                   }}"

+                   class="badge badge-secondary badge-pill border border-secondary"

+                   style="font-size:1em">

+                 <span class="fa fa-random"></span>

+                 {{ pull_request.branch_from }}

+               </a>

+           &nbsp;into&nbsp;

+             <a href="{{ url_for('ui_ns.view_tree',

+                       repo=pull_request.project.name,

+                       username=pull_request.project.user.user

+                       if pull_request.project.is_fork else None,

+                       namespace=repo.namespace,

+                       branchname=pull_request.branch)

+                       }}"

+                 class="badge badge-secondary badge-pill border border-secondary"

+                 style="font-size:1em">

+               <i class="fa fa-random"></i>

+             {{ pull_request.branch }}

+             </a>

+           </small>

+         </div>

+ 

+ 

+       </h4>

+     <div class="ml-auto">

+         {% if g.authenticated and (g.fas_user.username == pull_request.user.username

+           or g.repo_committer) and pull_request.status == 'Open'%}

+            {% if pull_request.status == 'Open' and g.authenticated and

+               (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+                 {% if mergeform and pull_request.remote %}

+                   <form style="display:inline;" action="{{ url_for(

+                     'ui_ns.refresh_request_pull', username=username,

+                     namespace=repo.namespace,

+                     repo=repo.name, requestid=requestid) }}" method="POST">

+                       <button type="submit" value="Refresh" id="refresh_pr"

+                               class="btn btn-outline-primary btn-sm" title="Refresh the remote pull request">

+                         <span class="fa fa-refresh"></span> Refresh

+                       </button>

+                       {{ mergeform.csrf_token }}

+                   </form>

+                 {% endif %}

+ 

+               <form style="display:inline;" action="{{ url_for(

+                   'ui_ns.cancel_request_pull', username=username,

+                   namespace=repo.namespace,

+                   repo=repo.name, requestid=requestid) }}" method="POST">

+            {% endif %}

+ 

+            {% if pull_request.status == 'Open' and g.authenticated and

+               (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+               {{ mergeform.csrf_token }}

+                   <button type="submit" value="Close" id="cancel_pr"

+                           class="btn btn-outline-danger btn-sm" title="Close PR without merging it">

+                     <span class="fa fa-times"></span> Cancel

+                   </button>

+           {% endif %}

+           {% if pull_request.status == 'Open' and g.authenticated and

+               (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

              </form>

            {% endif %}

+         {% endif %}

+         {% if pull_request.status == 'Open' %}

+         <div class="dropdown float-right ml-1">

+         <a href="#" id="merge_dropdown_btn"

+         class="btn btn-outline-secondary btn-sm disabled dropdown-toggle" title="Close PR without merging it" data-toggle="dropdown">

+           <span class="fa fa-circle-o-notch fa-spin fa-fw"></span> <span id="merge-status-text">Merge</span>

+           </a>

  

-         <form style="display:inline;" action="{{ url_for(

-             'ui_ns.cancel_request_pull', username=username,

+         <div id="merge-alert" class="text-xs-center dropdown-menu dropdown-menu-right p-0" style="min-width:400px">

+              <div class="alert text-center mb-0">

+               {% if pull_request.status == 'Open' and g.repo_committer %}

+               <small id="merge-alert-message"></small>

+               <form action="{{ url_for('ui_ns.merge_request_pull',

+                       repo=repo.name,

+                       username=username,

+                       namespace=repo.namespace,

+                       requestid=requestid)

+                 }}" method="POST">

+                 {{ mergeform.csrf_token }}

+                 <button id="merge_btn" type="submit"

+                   onclick="return confirm('Confirm merging this pull-request');"

+                   class="btn btn-block my-2">Merge</button>

+                 {% if can_delete_branch %}

+                 <div class="small">

+                 {{ mergeform.delete_branch }} {{ mergeform.delete_branch.label }}

+                 </div>

+                 {% endif %}

+               </form>

+             {% else %}

+             <small id="merge-alert-message"></small>

+             {% endif %}

+           </div>

+         </div>

+       </div>

+       {% endif %}

+       {% if pull_request.status == 'Closed' and g.authenticated and

+       (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+       <form action="{{ url_for(

+             'ui_ns.reopen_request_pull', username=username,

              namespace=repo.namespace,

              repo=repo.name, requestid=requestid) }}" method="POST">

-      {% endif %}

-           <div class="btn-group" role="group" aria-label="Basic example">

-             <a class="btn btn-sm btn-primary"

-                href="{{ url_for(

-                 'ui_ns.request_pull_edit',

-                 repo=repo.name,

-                 username=username,

-                 namespace=repo.namespace,

-                 requestid=requestid) }}"

-                title="Update title"><i class="fa fa-pencil"></i></a>

-      {% if pull_request.status == 'Open' and g.authenticated and

-         (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

-         {{ mergeform.csrf_token }}

-             <button type="submit" value="Close" id="cancel_pr"

-                     class="btn btn-danger btn-sm" title="Close PR without merging it">

-               <span class="fa fa-times"></span>

-             </button>

-     {% endif %}

-           </div>

-     {% if pull_request.status == 'Open' and g.authenticated and

-         (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

+       {{ mergeform.csrf_token }}

+       <button type="submit" value="Reopen" id="reopen_pr"

+               class="btn btn-sm btn-outline-danger" title="Reopen PR">

+         Reopen Pull Request 

+       </button>

        </form>

-     {% endif %}

-     </span>

-   {% endif %}

- </h3>

- 

-   <h5 class="text-muted">

-     Proposed <a href="#" data-toggle="tooltip" title="{{

-         pull_request.date_created | format_datetime

-       }}">{{ pull_request.date_created |humanize }}</a>

-     by {{ pull_request.user.default_email | avatar(16) | safe

-       }} <span title="{{ pull_request.user.html_title }}">{{ pull_request.user.user }}</span>

-   </h5>

-   <h5 class="text-muted">

-     Modified <a href="#" data-toggle="tooltip" title="{{

-         pull_request.last_updated | format_datetime

-       }}">{{ pull_request.last_updated |humanize }}</a>

-   </h5>

- 

-   From

-     <span class="pr-toplabel">{{

-         pull_request.project_from.fullname or pull_request.remote_git

-     }}</span> <span class="pr-toplabel">

-     <span class="fa fa-random"> </span>

-     <a href="{{ url_for('ui_ns.view_tree',

-           repo=pull_request.project_from.name,

-           username=pull_request.project_from.user.user

-             if pull_request.project_from.is_fork else None,

-           namespace=repo.namespace,

-           branchname=pull_request.branch_from)

-         }}">

-     {{ pull_request.branch_from }}

-     </a>

-     </span>

-   &nbsp;into

-     <span class="pr-toplabel">{{ pull_request.project.fullname }}</span>

-     <span class="pr-toplabel"><span class="fa fa-random"></span>

-     <a href="{{ url_for('ui_ns.view_tree',

-           repo=pull_request.project.name,

-           username=pull_request.project.user.user

-             if pull_request.project.is_fork else None,

-           namespace=repo.namespace,

-           branchname=pull_request.branch)

-         }}">

-     {{ pull_request.branch }}

-     </a>

-     </span>

- {%if pull_request and pull_request.initial_comment %}

- <section class="m-t-1" id="comment-0">

-   <div class="comment_body">

- {{ pull_request.initial_comment | markdown | noJS | safe }}

+    {% endif %}

+     </div>

    </div>

- </section>

- {%endif%}

  {% elif form and (g.repo_committer or remote_git) %}

  <h2>Create pull request</h2>

  {% else %}

  <h2>Diff

-       (<a href="{{ url_for('ui_ns.view_tree',

-             repo=repo.name,

-             username=username,

-             namespace=repo.namespace,

-             identifier=commitid) }}"

-       >tree</a>)</h2>

+     (<a href="{{ url_for('ui_ns.view_tree',

+           repo=repo.name,

+           username=username,

+           namespace=repo.namespace,

+           identifier=commitid) }}"

+     >tree</a>)</h2>

  

-     {% if origin == 'compare_commits' %}

-       <h5 class="text-muted">{{ commit1 }} .. {{ commit2 }}</h5>

-     {% endif %}

+   {% if origin == 'compare_commits' %}

+     <h5 class="text-muted">{{ commit1 }} .. {{ commit2 }}</h5>

+   {% endif %}

+ {% endif%}

  

- {% endif %}

+ 

+ <div class="row" id="pr-wrapper">

+   <div class="col-md-12">

  

  {% if form and (g.repo_committer or remote_git) %}

  <section class="new_project">
@@ -293,38 +388,62 @@ 

          {% for commit in diff_commits %}

  

              {% if pull_request and pull_request.status and pull_request.project_from.is_fork %}

-             <a class="list-group-item" href="{{

-                 url_for(

-                     'ui_ns.view_commit',

-                     repo=pull_request.project_from.name,

-                     username=pull_request.project_from.user.user,

-                     namespace=repo.namespace,

-                     commitid=commit.oid.hex)

-                 }}">

+               {% set commit_link = url_for(

+                 'ui_ns.view_commit',

+                 repo=pull_request.project_from.name,

+                 username=pull_request.project_from.user.user,

+                 namespace=repo.namespace,

+                 commitid=commit.oid.hex)%}

+               {% set tree_link = url_for(

+                 'ui_ns.view_tree', username=pull_request.project_from.user.user, namespace=repo.namespace,

+                 repo=repo.name, identifier=commit.hex) %}

              {% elif pull_request and pull_request.remote %}

-             <a>

+               {% set commit_link = None %}

              {% else %}

-             <a class="list-group-item" href="{{

-                 url_for('ui_ns.view_commit',

+               {% set commit_link = url_for('ui_ns.view_commit',

                          repo=repo.name,

                          username=username,

                          namespace=repo.namespace,

-                         commitid=commit.oid.hex)}}">

+                         commitid=commit.oid.hex) %}

+               {% set tree_link = url_for(

+                 'ui_ns.view_tree', username=username, namespace=repo.namespace,

+                 repo=repo.name, identifier=commit.hex) %}

              {% endif %}

- 

-             <h5>

-               <strong>{{ commit.message.strip().split('\n')[0] }}</strong>

-               <div class="pull-xs-right">

-                 <span class="commitdate" title="{{ commit.commit_time|format_ts }}">

-                   {{ commit.commit_time|humanize }}

-                 </span>

+             <div class="list-group-item">

+             <div class="row align-items-center">

+               <div class="col">

+                 {% if commit_link %}

+                   <a class="notblue" href="{{commit_link}}">

+                 {% endif %}

+                 <strong>{{ commit.message.strip().split('\n')[0] }}</strong>

+                 {% if commit_link %}

+                   </a>

+                 {% endif %}

+                 <div>

+                     {{commit.author|author2user_commits(

+                       link=url_for('ui_ns.view_commits',

+                           repo=repo.name,

+                           branchname=branchname,

+                           username=username,

+                           namespace=repo.namespace,

+                           author=commit.author.email),

+                       cssclass="notblue")|safe}}

+                       <span class="commitdate"

+                       title="{{ commit.commit_time|format_ts }}"> &bull;

+                     {{ commit.commit_time|humanize }}</span>&nbsp;&nbsp;

+                 </div>

                </div>

-             </h5>

-             {{ commit.author | author2avatar(20) | safe }} {{ commit.author.name }}

-             <div class="pull-xs-right">

-               <span class="label label-default">{{ commit.hex|short }}</span>

-             </div>

-           </a>

+               <div class="col-xs-auto pr-3 text-right">

+                   <div class="btn-group">

+                     <a href="{{ commit_link }}"

+                       class="btn btn-outline-primary font-weight-bold {{'disabled' if not commit_link}}">

+                       <code>{{ commit.hex|short }}</code>

+                     </a>

+                     <a class="btn btn-outline-primary font-weight-bold {{'disabled' if not commit_link}}" href="{{tree_link}}"><span class="fa fa-file-code-o fa-fw"></span></a>

+                   </div>

+                 </div>

+           </div>

+           </div>

          {% else %}

          <p class="error"> No commits found </p>

          {% endfor %}
@@ -387,10 +506,10 @@ 

  

                {% macro lineschanged(added, removed) -%}

                  {%if added%}

-                   <span class="label label-success pull-xs-right text-mono">+{{linesadded}}</span>

+                   <span class="badge badge-success pull-xs-right text-mono">+{{linesadded}}</span>

                  {%endif%}

                  {%if removed%}

-                   <span class="label label-danger pull-xs-right">-{{linesremoved}}</span>

+                   <span class="badge badge-danger pull-xs-right">-{{linesremoved}}</span>

                  {%endif%}

                {%endmacro%}

  
@@ -557,6 +676,7 @@ 

    <div class="tab-pane active" role="tabpanel" id="comments">

      <div class="row">

      <div class="col-md-8">

+     {{ show_pr_initial_comment(pull_request, repo, form, username) }}

      <section class="request_comment" id="request_comment">

      {% if pull_request.comments %}

        <form action="{{ url_for('ui_ns.pull_request_drop_comment',
@@ -587,15 +707,14 @@ 

              </div>

            </div>

          {% elif comment.notification %}

-           <div class="card">

-             <div class="card-header">

-               <div>

-                 <div class="pull-xs-right text-muted">

-                     <span title="{{ comment.date_created | format_datetime }}">{{

-                         comment.date_created | humanize }}</span>

-                 </div>

-                 <small>{{ comment.comment | markdown | noJS | safe }}</small>

-               </div>

+           <div class="d-flex align-items-center px-3 py-2 mb-3">

+             <div class="">

+                 {{ comment.user.default_email | avatar(24) | safe }}

+             </div>

+             <span class="text-semimuted font-size-09 autogenerated-comment pl-4">{{ comment.comment | markdown | noJS | safe }}</span>

+             <div class="text-muted ml-auto">

+                 <span title="{{ comment.date_created | format_datetime }}">{{

+                     comment.date_created | humanize }}</span>

              </div>

            </div>

          {% else %}
@@ -609,55 +728,55 @@ 

      </section>

  

      {% if g.authenticated and mergeform and pull_request %}

-     <div class="card">

-       <div class="card-header">

- 

-         <section class="request_comment add_comment">

- 

-           {% if g.authenticated %}

-             <form action="{{ url_for(

-                 'ui_ns.pull_request_add_comment',

-                 repo=repo.name,

-                 username=username,

-                 namespace=repo.namespace,

-                 requestid=requestid) }}"

-                 method="post" onsubmit="return try_async_comment(this, false)">

-               {{ mergeform.csrf_token }}

+     <div class="card mt-5">

+     {% if g.authenticated %}

  

-               <fieldset class="form-group">

-                 <label for="comment"><strong>Add new comment</strong></label>

-                 <small class="text-muted pull-xs-right">

-                   <span class="btn btn-sm btn-secondary inactive"

-                     aria-pressed="false" id="previewinmarkdown">Preview

-                   </span>

-                 </small>

+       <div class="card-header pb-0 pt-1 bg-light">

+         <div class="row">

+           <div class="col align-self-center">

+                 <span><strong>Add new comment</strong></span>

+           </div>

+           <div class="col">

+                   <ul class="nav nav-tabs float-right">

+                     <li class="nav-item">

+                       <a class="nav-link" id="previewinmarkdown" href="javascript:void(0)">Preview</a>

+                     </li>

+                     <li class="nav-item">

+                       <a class="nav-link active" id="editinmarkdown" href="javascript:void(0)">Edit</a>

+                     </li>

+                   </ul>

                  {% if repo.quick_replies %}

                  {% include "quick_reply.html" %}

                  {% endif %}

+             </div>

+         </div>

+       </div>

+       <form action="{{ url_for(

+         'ui_ns.pull_request_add_comment',

+         repo=repo.name,

+         username=username,

+         namespace=repo.namespace,

+         requestid=requestid) }}"

+         method="post" onsubmit="return try_async_comment(this, false)">

+       {{ mergeform.csrf_token }}

+       <div class="card-body">

                  <textarea class="form-control" rows=8 id="comment" name="comment"

                  placeholder="Enter your comment here" tabindex=1></textarea>

                  <div id="preview">

                  </div>

-               </fieldset>

+         </div>

+         <div class="d-flex align-items-center card-footer bg-light">

+             <small>Comments use <a href="https://docs.pagure.org/pagure/usage/markdown.html"

+                target="_blank" rel="noopener noreferrer" class="notblue">Markdown Syntax</a></small>

+             <div class="ml-auto">

+               <input type="submit" class="btn btn-primary"

+                 value="Submit Comment" tabindex=2 />

+             </div>

+             </div>

+         </form>

  

-               <a href="https://docs.pagure.org/pagure/usage/markdown.html"

-                  target="_blank" rel="noopener noreferrer">Markdown Syntax</a>

-               <div>

-                 <input type="submit" class="btn btn-primary"

-                   value="Submit Comment" tabindex=2 />

-               </div>

-             </form>

-           {% else %}

-             <p>

-               <a href="{{ url_for('auth_login', next=request.url) }}">

-                 Login

-               </a> to comment on this ticket.

-             </p>

            {% endif %}

-         </section>

- 

-       </div>

-     </div>

+   </div>

        {% if pull_request %}

        <div class="small">

          <p>Pull this pull-request locally <a href="#" id="local_pull_info_btn">v</a></p>
@@ -670,89 +789,20 @@ 

    </div>

    <div class="col-md-4">

    {% if pull_request %}

-     <section class="pr_info">

-       <div id="spinner" class="content-loading" style="display:none"></div>

-       <div id="merge-alert" class="alert text-xs-center" style="display:none;" role="alert">

-       {% if pull_request.status == 'Open' and g.repo_committer %}

-        <div>

-         <form action="{{ url_for('ui_ns.merge_request_pull',

-                 repo=repo.name,

-                 username=username,

-                 namespace=repo.namespace,

-                 requestid=requestid)

-           }}" method="POST">

-           {{ mergeform.csrf_token }}

-           <button id="merge_btn" type="submit"

-             onclick="return confirm('Confirm merging this pull-request');"

-             class="btn btn-block">Merge</button>

-           <small id="merge-alert-message"></small>

-           {% if can_delete_branch %}

-           <div class="small">

-           {{ mergeform.delete_branch }} {{ mergeform.delete_branch.label }}

+     <div>

+     <div class="mb-4">

+         <h5 class="d-flex align-items-center font-weight-bold border border-primary border-left-0 border-right-0 border-top-0">

+           <div class="py-2 text-semimuted text-uppercase font-size-09">Metadata</div>

+           {% if g.authenticated and mergeform and pull_request.status == 'Open'

+           and (g.repo_committer

+               or g.fas_user.username == pull_request.user.user) %}

+           <div class="ml-auto">

+           <a class="btn btn-outline-primary border-0 btn-sm issue-metadata-display editmetadatatoggle" href="javascript:void(0)"><i class="fa fa-fw fa-pencil"></i></a>

+           <a class="btn btn-outline-secondary border-0 btn-sm issue-metadata-form editmetadatatoggle" href="javascript:void(0)" ><i class="fa fa-fw fa-times"></i></a>

            </div>

-           {% endif %}

-         </form>

-        </div>

-       {% else %}

-       <small id="merge-alert-message"></small>

-       {% endif %}

- 

-       </div>

-       {% if pull_request.status != 'Open'%}

-       <div class="alert {{'alert-success' if pull_request.status == 'Merged' else 'alert-danger'}}

-                   text-xs-center" role="alert">

-        <div>{{ pull_request.status }} by

-           <a href="{{ url_for('ui_ns.view_user', username=pull_request.closed_by.user)}} ">

-             {{ pull_request.closed_by.user if pull_request.closed_by else ''}}

-           </a> {{pull_request.closed_at|humanize}}

-         {% if pull_request.status == 'Closed' and g.authenticated and

-            (g.repo_committer or g.fas_user.username == pull_request.user.username) %}

-          <form action="{{ url_for(

-                 'ui_ns.reopen_request_pull', username=username,

-                 namespace=repo.namespace,

-                 repo=repo.name, requestid=requestid) }}" method="POST">

-           {{ mergeform.csrf_token }}

-           <button type="submit" value="Reopen" id="reopen_pr"

-                   class="btn btn-sm btn-primary" title="Reopen PR">

-             Re-Open

-           </button>

-         </form>

          {% endif %}

-        </div>

-       </div>

-       {% endif %}

- 

-     {% if pull_request.flags %}

-     <div class="card" id="pr_flags">

-       <ul class="list-group list-group-flush">

-         {% for flag in pull_request.flags %}

-           <li class="list-group-item">

-             <div>

-               <span>

-                 <a href="{{ flag.url }}">{{ flag.username }}</a>

-               </span>

-               <div class="pull-xs-right">

-                 <span class="label {{ flag | flag2label }}">

-                   {{ flag.status }}

-                   {%- if flag.percent %} ({{ flag.percent }}%) {%- endif %}

-                 </span>

-               </div>

-             </div>

-             <small><div class="clearfix">

-                 <span>{{ flag.comment }}</span>

-                 <div title="{{ flag.date_created }}" class="pull-xs-right">

-                 {{ flag.date_created | humanize }}</div>

-             </div>

-             </small>

-           </li>

-         {% endfor %}

-       </ul>

-     </div>

-     {% endif %}

- 

-     <div class="card mb-3">

-       <div class="card-block p-3">

-         {% if authenticated and mergeform and pull_request.status == 'Open'

+         </h5>

+         {% if g.authenticated and mergeform and pull_request.status == 'Open'

              and g.repo_committer %}

            <form method="POST" action="{{ url_for('ui_ns.update_pull_requests',

                repo=repo.name,
@@ -760,7 +810,7 @@ 

                namespace=repo.namespace,

                requestid=requestid) }}">

              <fieldset class="form-group issue-metadata-form">

-               <label><strong>Assignee</strong></label>

+               <label class="text-semimuted"><strong>Assignee</strong></label>

                <div>

                  <input value="{{ pull_request.assignee.username or '' }}"

                      name="user" id="assignee" placeholder="username" >
@@ -768,10 +818,14 @@ 

                </div>

                </fieldset>

          {% endif %}

-         <fieldset class="form-group issue-metadata-display">

-           <label><strong>Assignee</strong></label>

-           <div title="{{ pull_request.assignee.html_title if pull_request.assignee else '' }}">

-             {{ pull_request.assignee.username or 'Unassigned' }}

+         <fieldset class="form-group issue-metadata-display ml-1">

+           <label class="mb-0 text-semimuted"><strong>Assignee</strong></label>

+           <div class="ml-2" title="{{ pull_request.assignee.html_title if pull_request.assignee else '' }}">

+             {% if pull_request.assignee.username %}

+               <div class="mt-1">{{pull_request.assignee.username| avatar(size=24) | safe}} {{ pull_request.assignee.username }}</div>

+             {% else %}

+               <span class="text-muted">None</span>

+             {% endif %}

            </div>

          </fieldset>

  
@@ -779,20 +833,21 @@ 

              g.repo_user

              or g.fas_user.username == pull_request.user.user) %}

          <fieldset class="form-group issue-metadata-form">

-           <label for="tag"><strong>Tags</strong></label>

+           <label for="tag" class="text-semimuted"><strong>Tags</strong></label>

             <input id="tag" type="text" placeholder="tag1, tag2" name="tag"

                title="comma separated list of tags"

                value="{{ pull_request.tags_text | join(',') }}" />

          </fieldset>

          {% endif%}

  

-         <fieldset class="form-group issue-metadata-display">

-           <label><strong>Tags</strong></label>

-             <h4 id="taglist">

+         <fieldset class="form-group issue-metadata-display ml-1">

+           <label class="mb-0 text-semimuted"><strong>Tags</strong></label>

+           {% if pull_request.tags %}

+             <h4 id="taglist" class="ml-2">

                {% for tag in pull_request.tags %}

                  <a id="tag-{{ tag.tag }}" title="{{ tag.tag_description }}"

-                   style="background-color:{{ tag.tag_color}}"

-                   class="label label-default"

+                   style="background-color:{{ tag.tag_color}}; width:100%; display:block;"

+                   class="badge badge-primary text-left my-1 p-2"

                    href="{{ url_for('ui_ns.request_pulls',

                        repo=repo.name,

                        username=username,
@@ -802,135 +857,177 @@ 

                  </a>

                {% endfor %}

              </h4>

+           {% else %}

+             <div class="text-muted">No Tags</div>

+           {% endif %}

          </fieldset>

  

-         {% if authenticated and mergeform and pull_request.status == 'Open'

+         {% if g.authenticated and mergeform and pull_request.status == 'Open'

                  and (g.repo_committer

                      or g.fas_user.username == pull_request.user.user) %}

  

                <input type="submit" class="btn btn-primary issue-metadata-form" value="Update">

-               <a class="btn btn-secondary issue-metadata-form editmetadatatoggle" >Cancel</a>

              </form>

-             <a class="btn btn-secondary issue-metadata-display editmetadatatoggle" >Edit Metadata</a>

          {% endif %}

-       </div>

      </div>

  

+ 

+     {% if pull_request.flags %}

+     <div class="mb-4">

+         <h5 class="d-flex align-items-center font-weight-bold border border-primary border-left-0 border-right-0 border-top-0">

+           <div class="py-2 text-semimuted text-uppercase font-size-09">Flags</div>

+         </h5>

+         <div class="list-group list-group-flush">

+         {% for flag in pull_request.flags %}

+         <a href="{{ flag.url }}" class="list-group-item list-group-item-action border-0 pl-2 pr-2">

+             <div>

+               <span class="font-weight-bold text-semimuted">

+                 {{ flag.username }}

+               </span>

+               <div class="float-right">

+                 <span class="badge {{ flag | flag2label }} font-size-09">

+                   {{ flag.status }}

+                   {%- if flag.percent %} ({{ flag.percent }}%) {%- endif %}

+                 </span>

+               </div>

+             </div>

+             <small><div class="clearfix">

+                 <span>{{ flag.comment }}</span>

+                 <div title="{{ flag.date_created }}" class="float-right">

+                 {{ flag.date_created | humanize }}</div>

+             </div>

+             </small>

+           </a>

+         {% endfor%}

+         </div>

+     </div>

+     {% endif %}

+ 

      {% if g.authenticated %}

-       {% if subscribers %}

-       <div class="card">

-         <div class="card-block">

-           <fieldset class="form-group">

-             <label><strong>Subscribers</strong> ({{

-               subscribers | length }})</label>

-             <div id="subscribers_list">

+       <div class="mt-3">

+           <h5 class="d-flex align-items-center font-weight-bold border border-primary border-left-0 border-right-0 border-top-0">

+               <div class="py-2 text-semimuted text-uppercase font-size-09">

+                 Subscribers

+                 <span class="badge badge-secondary badge-pill font-size-09 ml-1">{{subscribers|count}}</span>

+               </div>

+               <div class="ml-auto">

+                   <a href="#" class="btn btn-sm btn-link" id="subcribe-btn"

+                   {% if g.fas_user.username in subscribers -%}

+                     title="Unsubscribe from this pull-request">Unsubscribe

+                   {%- else -%}

+                     title="Subscribe to this pull-request">Subscribe

+                   {%- endif -%}

+                 </a>

+                 </div>

+             </h5>

+               {% if subscribers %}

+ 

+             <div id="subscribers_list" class="p-2">

              {% for subscriber in subscribers %}

                  <a href="{{ url_for('ui_ns.view_user', username=subscriber)

                  }}" title="{{ subscriber }}">{{

-                   subscriber |avatar(size=24) | safe

+                   subscriber |avatar(size=30, css_class="pb-1") | safe

                  }}</a>

              {% endfor %}

+ 

              </div>

-           </fieldset>

-         </div>

-       </div>

-       {% endif %}

-       <div class="card-block">

-         <button class="btn btn-md" id="subcribe-btn"

-         {% if g.fas_user.username in subscribers -%}

-           title="Unsubscribe from this pull-request">Unsubscribe

-         {%- else -%}

-           title="Subscribe to this pull-request">Subscribe

-         {%- endif -%}

-         </button>

+             {% endif %}

+ 

        </div>

      {% endif %}

  

-     </section>

+     </div>

    {% endif %}

    {% if diff and pull_request%}

-     <div class="card clearfix">

-       <div class="card-header">

-         <h5><strong>Changes summary</strong></h5>

-       </div>

+     <div class="mt-3">

+       <h5 class="d-flex align-items-center font-weight-bold border border-primary border-left-0 border-right-0 border-top-0">

+           <div class="py-2 text-semimuted text-uppercase font-size-09">

+             Changes Summary

+             <span class="badge badge-secondary badge-pill font-size-09 ml-1">{{ diff|length if diff else 0}}</span>

+           </div>

+       </h5>

      {% macro changeschangedfile(filepath, added, removed, diffanchor) -%}

-         <div class="clearfix" style="margin-left:-4px;">

-           <div class="pull-xs-right">

-             <span class="label label-success">+{{added}}</span>

-             <span class="label label-danger">-{{removed}}</span>

+     <a href="#_{{diffanchor}}" class="list-group-item list-group-item-action pl-2 pr-2 border-0">

+         <div class="clearfix">

+           <div class="float-right">

+             <span class="font-size-09 badge badge-success">+{{added}}</span>

+             <span class="font-size-09 badge badge-danger">-{{removed}}</span>

            </div>

            <div class="pull-xs-left pr-changes-description">

              <strong>file <span class="text-muted">changed</span></strong>

            </div>

          </div>

          <div class="ellipsis pr-changes-description">

-           <a href="#_{{diffanchor}}">{{filepath}}</a>

+           <small>{{filepath}}</small>

          </div>

+       </a>

      {%- endmacro %}

      {% macro changesrenamedfile(oldfilepath, newfilepath, added, removed, diffanchor) -%}

-         <div class="clearfix" style="margin-left:-4px;">

-           <div class="pull-xs-right"><span class="label label-success">+{{added}}</span> <span class="label label-danger">-{{removed}}</span></div>

+     <a href="#_{{diffanchor}}" class="list-group-item list-group-item-action pl-2 pr-2 border-0">

+         <div class="clearfix">

+           <div class="float-right"><span class="font-size-09 badge badge-success">+{{added}}</span> <span class="font-size-09 badge badge-danger">-{{removed}}</span></div>

            <div class="pull-xs-left pr-changes-description"><strong>file <span class="text-warning">renamed</span></strong></div>

          </div>

          <div class="ellipsis pr-changes-description">

            <strike class="text-muted">{{oldfilepath}}</strike> <br/>

-           <a href="#_{{diffanchor}}">{{newfilepath}}</a>

+           <small>{{newfilepath}}</small>

          </div>

+       </a>

      {%- endmacro %}

      {% macro changesdeletedfile(filepath, added, removed, diffanchor) -%}

-         <div class="clearfix" style="margin-left:-4px;">

-           <div class="pull-xs-right"><span class="label label-danger">-{{removed}}</span></div>

+     <a href="#_{{diffanchor}}" class="list-group-item list-group-item-action pl-2 pr-2 border-0">

+         <div class="clearfix">

+           <div class="float-right"><span class="font-size-09 badge badge-danger">-{{removed}}</span></div>

            <div class="pull-xs-left pr-changes-description"><strong>file <span class="text-danger">removed</span></strong></div>

          </div>

          <div class="ellipsis pr-changes-description">

-           <a href="#_{{diffanchor}}">{{filepath}}</a>

+           <small>{{filepath}}</small>

          </div>

+     </a>

      {%- endmacro %}

      {% macro changesaddedfile(filepath, added, removed, diffanchor) -%}

-         <div class="clearfix" style="margin-left:-4px;">

-           <div class="pull-xs-right"><span class="label label-success">+{{added}}</span></div>

+     <a href="#_{{diffanchor}}" class="list-group-item list-group-item-action pl-2 pr-2 border-0">

+         <div class="clearfix">

+           <div class="float-right"><span class="font-size-09 badge badge-success">+{{added}}</span></div>

            <div class="pull-xs-left pr-changes-description"><strong>file <span class="text-success">added</span></strong></div>

          </div>

          <div class="ellipsis pr-changes-description">

-           <a href="#_{{diffanchor}}">{{filepath}}</a>

+           <small>{{filepath}}</small>

          </div>

+     </a>

      {%- endmacro %}

      <div class="list-group list-group-flush">

-     {% set count = 0 %}

      {% for patch in diff %}

-         {% set count = count+1 %}

-         <div class="list-group-item">

-             {% set linesadded = patch.line_stats[1] %}

-             {% set linesremoved = patch.line_stats[2] %}

+           {% set linesadded = patch.line_stats[1] %}

+           {% set linesremoved = patch.line_stats[2] %}

            {% if patch | hasattr('new_file_path') %}

              {%- if patch.new_file_path == patch.old_file_path -%}

                {%- if patch.status == 'D' -%}

-                 {{ changesdeletedfile(patch.new_file_path, linesadded, linesremoved, count) }}

+                 {{ changesdeletedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}

                {%-elif patch.status == 'A' -%}

-                 {{ changesaddedfile(patch.new_file_path, linesadded, linesremoved, count) }}

+                 {{ changesaddedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}

                {%-elif patch.status == 'M' -%}

-                 {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, count) }}

+                 {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}

                {%-endif-%}

              {%- else -%}

-               {{changesrenamedfile(patch.old_file_path, patch.new_file_path, linesadded, linesremoved, count)}}

+               {{changesrenamedfile(patch.old_file_path, patch.new_file_path, linesadded, linesremoved, loop.index)}}

              {%- endif -%}

            {%- elif patch | hasattr('delta') -%}

              {%- if patch.delta.new_file.path == patch.delta.old_file.path -%}

                {%- if patch.delta.new_file.mode == 0

                    and patch.delta.old_file.mode in [33188, 33261] -%}

-                 {{ changesdeletedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}

+                 {{ changesdeletedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}

                {%-elif patch.delta.new_file.mode in [33188, 33261]

                     and patch.delta.old_file.mode == 0 -%}

-                 {{ changesaddedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}

+                 {{ changesaddedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}

                {%-elif patch.delta.new_file.mode in [33188, 33261]

                     and patch.delta.old_file.mode in [33188, 33261] -%}

-                 {{ changeschangedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}

+                 {{ changeschangedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}

                {%-endif-%}

              {%- else -%}

-               {{changesrenamedfile(patch.delta.old_file.path, patch.delta.new_file.path, linesadded, linesremoved, count)}}

+               {{changesrenamedfile(patch.delta.old_file.path, patch.delta.new_file.path, linesadded, linesremoved, loop.index)}}

              {%- endif -%}

            {%- endif -%}

-         </div>

      {% endfor %}

        </div>

      </div>
@@ -1053,7 +1150,7 @@ 

    $(".reply").unbind();

    $( ".reply" ).click(

      function() {

-       var _section = $(this).closest('.card-body');

+       var _section = $(this).closest('.card');

        var _comment = _section.find('.comment_body');

        var _text = _comment.text().split("\n");

        var _output = new Array();
@@ -1079,35 +1176,51 @@ 

    function process_response(res) {

        $('#spinner').hide();

        if (res.code == 'FFORWARD'){

+         $('#merge_dropdown_btn').toggleClass("btn-outline-secondary btn-success");

+         $('#merge_dropdown_btn').removeClass("disabled");

+         $('#merge_dropdown_btn span.fa').toggleClass("fa-circle-o-notch fa-check");

+         $('#merge_dropdown_btn span.fa').removeClass("fa-spin");

          $('#merge_btn').addClass("btn-success");

-         $('#merge-alert').addClass("alert-success");

+         $('#merge-alert .alert').addClass("alert-success");

          $('#merge-alert-message').append(res.message);

-         $('#merge-alert').show();

        }

        else if (res.code == 'MERGE') {

+         $('#merge_dropdown_btn').toggleClass("btn-outline-secondary btn-warning");

+         $('#merge_dropdown_btn').removeClass("disabled");

+         $('#merge_dropdown_btn span.fa').toggleClass("fa-circle-o-notch fa-check");

+         $('#merge_dropdown_btn span.fa').removeClass("fa-spin");

          $('#merge_btn').addClass("btn-warning");

-         $('#merge-alert').addClass("alert-warning");

+         $('#merge-alert .alert').addClass("alert-warning");

          $('#merge-alert-message').append(res.message);

-         $('#merge-alert').show();

        }

        else if (res.code == 'CONFLICTS') {

+         $('#merge_dropdown_btn').toggleClass("btn-outline-secondary btn-danger");

+         $('#merge_dropdown_btn').removeClass("disabled");

+         $('#merge_dropdown_btn span.fa').toggleClass("fa-circle-o-notch fa-times");

+         $('#merge_dropdown_btn span.fa').removeClass("fa-spin");

          $('#merge_btn').hide();

-         $('#merge-alert').addClass("alert-danger");

+         $('#merge-alert .alert').addClass("alert-danger");

          $('#merge-alert-message').append(res.message);

-         $('#merge-alert').show();

          $('#merge-alert div.small').hide();

        }

        else if (res.code == 'NO_CHANGE') {

          $('#merge_btn').hide();

-         $('#merge-alert').addClass("alert-info");

+         $('#merge_dropdown_btn').removeClass("disabled");

+         $('#merge_dropdown_btn span.fa').toggleClass("fa-circle-o-notch fa-times");

+         $('#merge_dropdown_btn span.fa').removeClass("fa-spin");

+         $('#merge-alert .alert').addClass("alert-secondary");

          $('#merge-alert-message').append(res.message);

-         $('#merge-alert').show();

          $('#merge-alert div.small').hide();

        }

    };

    $('#spinner').show();

+   function sleep(ms) {

+   return new Promise(resolve => setTimeout(resolve, ms));

+ }

+ 

    $.ajax({

      url: '{{ url_for("internal_ns.mergeable_request_pull") }}' ,

+     beforeSend: function(){sleep(8000); return true;},

      type: 'POST',

      data: {

        requestid: "{{ pull_request.uid }}",
@@ -1557,7 +1670,6 @@ 

        var _token = "{{ mergeform.csrf_token.current_token }}";

        {% endif %}

  

-       if ($( "#previewinmarkdown" ).hasClass("inactive")){

          var _text = _el.val();

          var _url = "{{ url_for('ui_ns.markdown_preview') }}";

          $.ajax({
@@ -1571,9 +1683,8 @@ 

            success: function(res) {

              var preview = emojione.toImage(res);

              $( "#preview" ).html(preview);

-             $( "#previewinmarkdown" ).removeClass("inactive");

-             $( "#previewinmarkdown" ).addClass("active");

-             $( "#previewinmarkdown" ).text("Edit");

+             $( "#previewinmarkdown" ).toggleClass("active");

+             $( "#editinmarkdown" ).toggleClass("active");

              _el.hide();

              $( "#preview" ).show();

            },
@@ -1582,13 +1693,23 @@ 

            }

          });

          return false;

-       } else if ($( "#previewinmarkdown" ).hasClass("active")){

-         $( "#previewinmarkdown" ).addClass("inactive");

-         $( "#previewinmarkdown" ).removeClass("active");

-         $( "#previewinmarkdown" ).text("Preview");

-         _el.show();

-         $( "#preview" ).hide();

-       }

+     }

+   );

+ 

+   $( "#editinmarkdown" ).click(

+     function(event, ui) {

+       {% if form %}

+       var _el = $( "#initial_comment" );

+       var _token = "{{ form.csrf_token.current_token }}";

+       {% else %}

+       var _el = $( "#comment" );

+       var _token = "{{ mergeform.csrf_token.current_token }}";

+       {% endif %}

+ 

+       $( "#editinmarkdown" ).toggleClass("active");

+       $( "#previewinmarkdown" ).toggleClass("active");

+       _el.show();

+       $( "#preview" ).hide();

      }

    );

    {% endif %}

@@ -1,5 +1,5 @@ 

- <div class="btn-group qr pull-xs-right" data-toggle="tooltip" data-placement="bottom" title="">

-   <button type="button" class="btn btn-secondary btn-sm dropdown-toggle qr-btn" data-toggle="dropdown">

+ <div class="btn-group qr float-right" data-toggle="tooltip" data-placement="bottom" title="Quick Replies">

+   <button type="button" class="btn btn-outline-secondary border-0 dropdown-toggle qr-btn" data-toggle="dropdown">

      <span class="fa fa-list-ul"></span> <span class="caret"></span>

    </button>

    <div class="dropdown-menu dropdown-menu-right">

file modified
+1 -1
@@ -122,7 +122,7 @@ 

                  ' data-filename="%(filename)s" data-commit="%(commit)s"'

                  ' data-tree="%(tree_id)s">'

                  '<p>'

-                 '<span class="oi prc_img" data-glyph="comment-square" '

+                 '<span class="fa fa-comment prc_img" style="display: none;"'

                  'alt="Add comment" title="Add comment"></span>'

                  '</p>'

                  '</td>' % (

file modified
+2 -2
@@ -798,8 +798,8 @@ 

          flask.flash('Invalid input submitted', 'error')

  

      return flask.redirect(flask.url_for(

-         'ui_ns.request_pull', repo=repo, username=username, namespace=namespace,

-         requestid=requestid))

+         'ui_ns.request_pull', repo=repo, username=username,

+         namespace=namespace, requestid=requestid))

  

  

  @UI_NS.route(

@@ -289,10 +289,9 @@ 

              '</a>', output_text)

  

          self.assertIn(

-             '<span class="label label-success '

-             'pull-xs-right text-mono">+3</span>', output_text)

+             '<span class="badge badge-success pull-xs-right text-mono">+3</span>', output_text)

          self.assertIn(

-             '<span class="label label-danger pull-xs-right">-1</span>',

+             '<span class="badge badge-danger pull-xs-right">-1</span>',

              output_text)

  

      @patch('pagure.lib.notify.send_email')
@@ -382,8 +381,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn(

                  '</button>\n                      This request must be '
@@ -402,8 +405,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn(

                  '</button>\n                      Only the assignee can '
@@ -423,8 +430,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn(

                  '</button>\n                      This request does not '
@@ -454,7 +465,9 @@ 

              # Check if the closing notification was added

              output = self.app.get('/test/pull-request/1')

              self.assertIn(

-                 '<small><p>Pull-Request has been merged by pingou</p></small>',

+                 '<span class="text-info font-weight-bold">Merged</span> just now\n'

+                 '            </span>\n            by\n'

+                 '            <span title="PY C (pingou)">pingou.</span>\n',

                  output.get_data(as_text=True))

  

      @patch('pagure.lib.notify.send_email')
@@ -490,7 +503,9 @@ 

              # Check if the closing notification was added

              output = self.app.get('/test/pull-request/1')

              self.assertIn(

-                 '<small><p>Pull-Request has been merged by pingou</p></small>',

+                 '<span class="text-info font-weight-bold">Merged</span> just now\n'

+                 '            </span>\n            by\n'

+                 '            <span title="PY C (pingou)">pingou.</span>\n',

                  output.get_data(as_text=True))

  

      @patch('pagure.lib.notify.send_email')
@@ -555,8 +570,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn('Merge conflicts!', output_text)

  
@@ -588,8 +607,10 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature-branch branch\n     <span class="pull-xs-right">',

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n'

+                 '              <span class="text-success font-weight-bold">#1</span>\n'

+                 '            <span class="font-weight-bold">\n'

+                 '                  PR from the feature-branch branch\n',

                  output_text)

              self.assertIn('Merge conflicts!', output_text)

  
@@ -625,17 +646,16 @@ 

                  '/test/pull-request/1/merge', data=data, follow_redirects=True)

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

-             self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  <span class="label label-success">Merged</span>',

-                 output_text)

+ 

              self.assertIn('Nothing to do, changes were already merged',

                            output_text)

  

              # Check if the closing notification was added

              output = self.app.get('/test/pull-request/1')

              self.assertIn(

-                 '<small><p>Pull-Request has been merged by pingou</p></small>',

+                 '<span class="text-info font-weight-bold">Merged</span> just now\n'

+                 '            </span>\n            by\n'

+                 '            <span title="PY C (pingou)">pingou.</span>\n',

                  output.get_data(as_text=True))

  

      @patch('pagure.lib.notify.send_email')
@@ -648,10 +668,9 @@ 

          output = self.app.get('/test/pull-request/1')

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

-         self.assertIn(

-             '<h3><span class="label label-default">PR#1</span>\n'

-             '  <span class="label label-success">', output_text)

-         self.assertIn('<div>Merged by\n', output_text)

+ 

+         self.assertIn('<span class="text-info font-weight-bold">Merged</span> '

+             'just now\n            </span>\n            by\n', output_text)

          self.assertIn(

              'title="View file as of 2a552b">sources</a>', output_text)

  
@@ -757,11 +776,15 @@ 

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

          self.assertIn(

-             '<h3><span class="label label-default">PR#1</span>\n'

-             '  PR from the feature branch\n</h3>', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

          self.assertTrue(

              output_text.count(

-                 '<span class="commitdate" title='), 1)

+                 '<span class="commitdate"'), 1)

          self.assertTrue(update_pull_ref.called)

  

          shutil.rmtree(newpath)
@@ -1599,8 +1622,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertNotIn(

                  '</button>\n                      Request assigned',

                  output_text)
@@ -1624,8 +1651,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertNotIn(

                  '</button>\n                      Request assigned',

                  output_text)
@@ -1645,8 +1676,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertIn(

                  '</button>\n                      No user &#34;bar&#34; found',

                  output_text)
@@ -1675,8 +1710,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertIn(

                  '</button>\n                      Request assigned',

                  output_text)
@@ -1740,8 +1779,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertNotIn(

                  '</button>\n                      Request assigned',

                  output_text)
@@ -1761,8 +1804,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertIn(

                  '</button>\n                      Pull-request tagged with: black',

                  output_text)
@@ -1807,31 +1854,9 @@ 

                  'PR#1: PR from the feature branch - test\n - Pagure'

              )

  

-             h3 = soup.find_all("h3")

-             self.assertIsNotNone(h3)

-             self.assertEqual(len(h3), 3)

-             # keep the last one only

-             h3 = h3[2]

-             self.assertListEqual(

-                 h3.find("span")["class"], ["label", "label-default"])

-             self.assertEqual(h3.find("span").string, "PR#1")

-             self.assertEqual(

-                 list(h3.stripped_strings)[1], 'PR from the feature branch')

-             alerts = [

-                 list(a.stripped_strings)[2] for a in

-                 soup.find_all("div", class_="alert")

-                 if list(a.stripped_strings)

-             ]

-             self.assertIn('Pull-request **un**tagged with: black', alerts)

-             self.assertIn('Pull-request tagged with: blue, yellow', alerts)

-             input_tag = soup.find("input", id="tag")

-             self.assertEqual(

-                 input_tag["title"], "comma separated list of tags")

-             # The order is not guaranteed, compare sets.

-             self.assertEqual(

-                 set(input_tag["value"].split(",")),

-                 set(["blue", "yellow"])

-             )

+             self.assertIn('Pull-request **un**tagged with: black', output.get_data(as_text=True))

+             self.assertIn('Pull-request tagged with: blue, yellow', output.get_data(as_text=True))

+ 

  

          user.username = 'pingou'

          with tests.user_set(self.app.application, user):
@@ -2007,7 +2032,7 @@ 

                            output_text)

              self.assertEqual(

                  output_text.count('title="PY C (pingou)"'),

-                 1)

+                 2)

  

              # Test if the `open changed file icon` is displayed.

              self.assertIn(
@@ -2709,8 +2734,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n</h3>', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              #self.assertIn('href="#comment-1">¶</a>', output_text)

              self.assertIn(

                  '<p>This look alright but we can do better</p>',
@@ -2743,8 +2772,12 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn(

                  '</button>\n                      Comment removed',
@@ -2800,8 +2833,12 @@ 

  

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              self.assertIn(

                  '</button>\n                      Comment added',
@@ -2832,15 +2869,19 @@ 

              self.assertIn(

                  '<p>This look alright but we can do better than this.</p>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n     <span class="pull-xs-right">',

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n',

                  output_text)

              # Checking if Edited by User is there or not

              self.assertTrue(

-                 '<small class="text-muted">Edited just now by pingou </small>'

+                 '<small class="text-semimuted">Edited just now by pingou </small>'

                  in output_text

                  or

-                 '<small class="text-muted">Edited seconds ago by pingou </small>'

+                 '<small class="text-semimuted">Edited seconds ago by pingou </small>'

                  in output_text)

              self.assertIn(

                  '</button>\n                      Comment updated', output_text)
@@ -2883,8 +2924,12 @@ 

                  '<title>PR#1: PR from the feature branch - test\n - '

                  'Pagure</title>', output_text)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>\n'

-                 '  PR from the feature branch\n</h3>', output_text)

+                 '<h4 class="ml-1">\n        <div>\n              '

+                 '<span class="fa fa-fw text-success fa-arrow-circle-down pt-1"></span>\n              '

+                 '<span class="text-success '

+                 'font-weight-bold">#1</span>\n            '

+                 '<span class="font-weight-bold">\n                  '

+                 'PR from the feature branch\n', output_text)

              self.assertIn(

                  'title="View file as of 2a552b">sources</a>', output_text)

  
@@ -2940,7 +2985,9 @@ 

              # Check if the closing notification was added

              output = self.app.get('/test/pull-request/1')

              self.assertIn(

-                 '<small><p>Pull-Request has been merged by pingou</p></small>',

+                 '<span class="text-info font-weight-bold">Merged</span> just now\n'

+                 '            </span>\n            by\n'

+                 '            <span title="PY C (pingou)">pingou.</span>\n',

                  output.get_data(as_text=True))

  

      @patch('pagure.lib.notify.send_email')

@@ -3835,10 +3835,6 @@ 

              self.assertTrue(

                  '<option selected value="Fixed">Fixed</option>'

                  in output_text)

-             self.assertEqual(

-                 output_text.count(

-                     'title="Reply to this comment - lose formatting">',

-                 ), 1)

  

      def _set_up_for_reaction_test(self, private=False):

          tests.create_projects(self.session)

@@ -240,7 +240,7 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertIn(

-                 '<h3><span class="label label-default">PR#1</span>',

+                 '<span class="text-success font-weight-bold">#1',

                  output_text)

              self.assertIn(

                  '<div class="card clearfix" id="_1">', output_text)
@@ -262,9 +262,15 @@ 

                  output_text)

              # Show the filename in the Changes summary

              self.assertIn(

-                 '<a href="#_1">.gitignore</a>', output_text)

+                 '<a href="#_1" class="list-group-item', output_text)

              self.assertIn(

-                 '<a href="#_1">sources</a>', output_text)

+                 '<div class="ellipsis pr-changes-description">'

+                 '\n          <small>.gitignore</small>', output_text)

+             self.assertIn(

+                 '<a href="#_2" class="list-group-item', output_text)

+             self.assertIn(

+                 '<div class="ellipsis pr-changes-description">'

+                 '\n          <small>sources</small>', output_text)

  

          # Remote PR Created

          self.session = pagure.lib.create_session(self.dbpath)

@@ -99,7 +99,7 @@ 

              '\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-info">pending</span>'

+             '<span class="badge badge-info">pending</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build is running</span>', output_text)
@@ -142,7 +142,7 @@ 

              '\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-success">success (100%)</span>'

+             '<span class="badge badge-success">success (100%)</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build passed</span>', output_text)
@@ -185,7 +185,7 @@ 

              '\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-danger">error</span>'

+             '<span class="badge badge-danger">error</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build errored</span>', output_text)
@@ -227,7 +227,7 @@ 

              'simple-koji-ci</a>\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-danger">failure</span>'

+             '<span class="badge badge-danger">failure</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build failed</span>', output_text)
@@ -269,7 +269,7 @@ 

              'simple-koji-ci</a>\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-warning">canceled</span>'

+             '<span class="badge badge-warning">canceled</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build canceled</span>', output_text)
@@ -278,8 +278,8 @@ 

                  {

                      'FLAG_STATUSES_LABELS':

                          {

-                             'status1': 'label-warning',

-                             'otherstatus': 'label-success',

+                             'status1': 'badge-warning',

+                             'otherstatus': 'badge-success',

                          },

                  })

      def test_view_commit_with_custom_flags(self):
@@ -319,7 +319,7 @@ 

              'simple-koji-ci</a>\n                  </span>', output_text)

          self.assertIn(

              '<div class="pull-xs-right">\n                    '

-             '<span class="label label-warning">status1</span>'

+             '<span class="badge badge-warning">status1</span>'

              '\n                  </div>', output_text)

          self.assertIn(

              '<span>Build canceled</span>', output_text)

@@ -350,9 +350,9 @@ 

          self.assertEqual(output.status_code, 200)

          output_text = output.get_data(as_text=True)

          self.assertEqual(

-             output_text.count('<span class="commitdate" title='), 1)

+             output_text.count('<span class="commitdate"'), 1)

          self.assertIn(

-             '<span class="label label-success pull-xs-right text-mono">'

+             '<span class="badge badge-success pull-xs-right text-mono">'

              '+1</span>', output_text)

          self.assertIn(

              '<div><small>file added</small></div></h5>', output_text)
@@ -363,9 +363,9 @@ 

              self.assertEqual(output.status_code, 200)

              output_text = output.get_data(as_text=True)

              self.assertEqual(

-                 output_text.count('<span class="commitdate" title='), 1)

+                 output_text.count('<span class="commitdate"'), 1)

              self.assertIn(

-                 '<span class="label label-success pull-xs-right text-mono">'

+                 '<span class="badge badge-success pull-xs-right text-mono">'

                  '+1</span>', output_text)

              self.assertIn(

                  '<div><small>file added</small></div></h5>', output_text)

One thing I notice is that the markdown syntax link is gone from the comment box. Can we put something there for people to get to the markdown syntax reference?

One thing I notice is that the markdown syntax link is gone from the comment box. Can we put something there for people to get to the markdown syntax reference?

the link is still there, is is just a notblue link, as it is not really an important link.

1 new commit added

  • Small fixes for the new PR page
5 years ago

Pretty please pagure-ci rebuild

Tests are passing \o/

I took on me to merge #3349 first, so we'll need to rebase this PR on master and check if the re-open button is at the right place.

@ryanlerch do you want to do it or shall I?

rebased onto 2aa95c7

5 years ago

2 new commits added

  • Small fixes for the new PR page
  • update pull request page
5 years ago

Pretty please pagure-ci rebuild

rebased to latest master, and tests passing locally. Just re-running the jenkins build now!

Pull-Request has been merged by ryanlerch

5 years ago