[Rt-commit] rt branch, 5.0/inline-edit-tooltip-direction, created. rt-5.0.0beta1-2-g87fa545ce9

? sunnavy sunnavy at bestpractical.com
Fri May 22 17:37:41 EDT 2020


The branch, 5.0/inline-edit-tooltip-direction has been created
        at  87fa545ce97dc69354fede5a3a570ee12bd5daf5 (commit)

- Log -----------------------------------------------------------------
commit b58ec5b71e867424b70c66e0ad5d1026273d4ae7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat May 23 05:16:59 2020 +0800

    Revert "Fix inline edit icons in ticket list when height is not big enough"
    
    This reverts commit ffa0b41f972e3b1e1c3b138b94e8c0845462ce0c.
    
    The commit could fix the "Edit" icon, but sadly can't fix the "Cancel"
    and "Save" icons because the min-height is not big enough. Bigger
    min-height causes unnecessary black space in the page, which is not a
    good fix either.

diff --git a/share/html/Elements/CollectionList b/share/html/Elements/CollectionList
index a07085d46b..604de25a10 100644
--- a/share/html/Elements/CollectionList
+++ b/share/html/Elements/CollectionList
@@ -125,7 +125,7 @@ $Class ||= $Collection->ColumnMapClassName;
 
 $InlineEdit = 0 unless $Collection->isa('RT::Tickets');
 
-$m->out('<div class="table-responsive' . ($InlineEdit ? ' inline-edit' : '') . '">');
+$m->out('<div class="table-responsive">');
 $m->out('<table cellspacing="0"');
 $m->out(' class="table ' .  ($Collection->isa('RT::Tickets') ? 'ticket-list' : 'collection') . ($InlineEdit ? ' inline-edit' : '') . ' collection-as-table"');
 $m->out(' data-display-format="' . $m->interp->apply_escapes($DisplayFormat, 'h') . '"');
diff --git a/share/static/css/elevator-light/inline-edit.css b/share/static/css/elevator-light/inline-edit.css
index 5c27c35400..5b80edfa63 100644
--- a/share/static/css/elevator-light/inline-edit.css
+++ b/share/static/css/elevator-light/inline-edit.css
@@ -101,10 +101,3 @@ td.editable > form.editor .form-row {
 .titlebox .inline-edit-display {
   display: block;
 }
-
-/* Because of .table-responsive's overflow setting, we need to give
- * inline-edit tooltips enough space to show up, otherwise the edit
- * icons would flicker and you can't really click it */
-.table-responsive.inline-edit {
-  min-height: 60px;
-}

commit 87fa545ce97dc69354fede5a3a570ee12bd5daf5
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat May 23 05:07:56 2020 +0800

    Set direction of inline-edit icon tooltips to horizontal in ticket list
    
    This is mainly to make sure tooltips could have enough space to show up.
    Otherwise because of .table-responsive's overflow setting, these icons
    would flicker and unclickable, e.g. when there is only one ticket in the
    list.

diff --git a/share/html/Elements/CollectionAsTable/Row b/share/html/Elements/CollectionAsTable/Row
index 833f56f596..aa1426fb92 100644
--- a/share/html/Elements/CollectionAsTable/Row
+++ b/share/html/Elements/CollectionAsTable/Row
@@ -176,8 +176,8 @@ foreach my $column (@Format) {
     if ( $attrs{edit} ) {
         $m->out( '<form method="POST" action="' . RT->Config->Get('WebPath') . '/Helpers/TicketUpdate?id=' . $record->id . '" class="editor" autocomplete="off">' );
         $m->out( $attrs{edit} );
-        $m->out( '<span class="cancel text-danger far fa-times-circle" data-toggle="tooltip" data-placement="top" data-original-title="' . loc('Cancel') . '"></span>' );
-        $m->out( '<span class="submit text-success far fa-check-circle" data-toggle="tooltip" data-placement="top" data-original-title="' . loc('Save') . '"></span>' );
+        $m->out( '<span class="cancel text-danger far fa-times-circle" data-toggle="tooltip" data-placement="left" data-original-title="' . loc('Cancel') . '"></span>' );
+        $m->out( '<span class="submit text-success far fa-check-circle" data-toggle="tooltip" data-placement="right" data-original-title="' . loc('Save') . '"></span>' );
         $m->out('<div class="spinner-border spinner-border-sm loading" role="status"><span class="sr-only">Loading...</span></div>');
         $m->out('</form>');
         $m->out('<div class="value"><span>');
@@ -186,7 +186,7 @@ foreach my $column (@Format) {
     $m->out(@out) if @out;
 
     if ( $attrs{edit} ) {
-        $m->out(  '</span> <span class="fas fa-pencil-alt edit-icon" data-toggle="tooltip" data-placement="top" data-original-title="'
+        $m->out(  '</span> <span class="fas fa-pencil-alt edit-icon" data-toggle="tooltip" data-placement="left" data-original-title="'
                 . loc('Edit')
                 . '"></span></div>' );
     }

-----------------------------------------------------------------------


More information about the rt-commit mailing list