Hello Hackers,

We found a discrepancy with the width of inserted columns in some backform
tables. It is at least present in Create Table -> Security [tab] ->
clicking [+] for new rows under each of Privileges and Security Labels. In
this case, the cell containing the delete icon is spaced differently.

After briefly investigating, it looks like width_percent_xx classes on too
many columns is to blame. We've attached a patch that resolves the
immediate issue by removing width_percent_50 from the last column of two
schemas. It feels like columns are overconstrained since by themselves
width percentages sum to 100%, but there is behavior that inserts
additional columns beyond those specified in the schema. For instance, the
unshifts in Backform.UniqueColCollectionControl.showGridControl in
backform.pgadmin.js

Let us know what you think of this removal of last-column constraint as an
approach.

Thanks,
Joao and George
commit 1ae2469b91f49e111f9ef401c1b33ee737f09eb5
Author: George Gelashvili and Joao Pereira 
<pair+ggelashvili+jpere...@pivotal.io>
Date:   Thu Jul 6 11:10:18 2017 -0400

    fix discrepancy with width of delete columns inserted into security labels 
backforms

diff --git 
a/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js 
b/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
index 8d8cca75..1c0917d1 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/role/js/role.js
@@ -31,7 +31,6 @@ define('pgadmin.node.role', [
     },{
       id: 'label', label: gettext('Security Label'),
       type: 'text', disabled: false,
-      cellHeaderClasses:'width_percent_50'
     }],
     validate: function() {
       var err = {},
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.js 
b/web/pgadmin/browser/server_groups/servers/static/js/server.js
index 34560583..811dc27f 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.js
@@ -23,7 +23,6 @@ define('pgadmin.node.server', [
       },{
         id: 'label', label: gettext('Security Label'),
         type: 'text', editable: true,
-        cellHeaderClasses:'width_percent_50'
       }],
       validate: function() {
         var err = {},

Reply via email to