public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][patch] pgadmin responsive not working as expected for desktop
7+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
@ 2019-01-17 12:32 Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Aditya Toshniwal @ 2019-01-17 12:32 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Attached is the patch to fix controls alignment responsiveness to docker
size change.

Kindly review.

-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


Attachments:

  [application/octet-stream] responsive_fix.patch (3.8K, 3-responsive_fix.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/static/js/panel.js b/web/pgadmin/browser/static/js/panel.js
index f582d0b9..646a6b95 100644
--- a/web/pgadmin/browser/static/js/panel.js
+++ b/web/pgadmin/browser/static/js/panel.js
@@ -147,27 +147,28 @@ define(
           }
           p.pgResizeTimeout = setTimeout(
             function() {
-              var w = p.width();
+              var w = p.width(),
+                elAttr = 'xs';
               p.pgResizeTimeout = null;
 
               /** Calculations based on https://getbootstrap.com/docs/4.1/layout/grid/#grid-options **/
               if (w < 480) {
-                w = 'xs';
+                elAttr = 'xs';
               }
               if (w >= 480) {
-                w = 'sm';
+                elAttr = 'sm';
               }
               if (w >= 768) {
-                w = 'md';
+                elAttr = 'md';
               }
               if (w >= 992) {
-                w = 'lg';
+                elAttr = 'lg';
               }
               if (w >=1200) {
-                w = 'xl';
+                elAttr = 'xl';
               }
 
-              p.pgElContainer.attr('el', w);
+              p.pgElContainer.attr('el', elAttr);
             },
             100
           );
diff --git a/web/pgadmin/static/js/alertify.pgadmin.defaults.js b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
index 0e890873..0002183f 100644
--- a/web/pgadmin/static/js/alertify.pgadmin.defaults.js
+++ b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
@@ -201,28 +201,29 @@ define([
     self.pgResizeTimeout = setTimeout(
       function() {
         var $el = $(this.elements.dialog),
-          w = $el.width();
+          w = $el.width(),
+          elAttr = 'xs';
 
         this.pgResizeTimeout = null;
 
         /** Calculations based on https://getbootstrap.com/docs/4.1/layout/grid/#grid-options **/
         if (w < 480) {
-          w = 'xs';
+          elAttr = 'xs';
         }
         if (w >= 480) {
-          w = 'sm';
+          elAttr = 'sm';
         }
         if (w >= 768) {
-          w = 'md';
+          elAttr = 'md';
         }
         if (w >= 992) {
-          w = 'lg';
+          elAttr = 'lg';
         }
         if (w >=1200) {
-          w = 'xl';
+          elAttr = 'xl';
         }
 
-        $el.attr('el', w);
+        $el.attr('el', elAttr);
       }.bind(self),
       100
     );
diff --git a/web/pgadmin/static/scss/_pgadmin.grid.scss b/web/pgadmin/static/scss/_pgadmin.grid.scss
index cb1781cf..6e3af52b 100644
--- a/web/pgadmin/static/scss/_pgadmin.grid.scss
+++ b/web/pgadmin/static/scss/_pgadmin.grid.scss
@@ -41,16 +41,52 @@
       flex-grow: 1;
       max-width: 100%;
     }
+  }
 
-    @for $i from 1 through $columns {
-      .pg-el-container[el=lg],
-      .pg-el-container[el=md],
-      .pg-el-container[el=sm]
-      .pg-el#{$infix}-#{$i} {
+  @for $i from 1 through $columns {
+    .pg-el-container[el=xl] {
+      .pg-el-sm-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-md-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-lg-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-xl-#{$i} {
+        @include make-col($i, $columns);
+      }
+    }
+
+    .pg-el-container[el=lg] {
+      .pg-el-sm-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-md-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-lg-#{$i} {
+        @include make-col($i, $columns);
+      }
+    }
+
+    .pg-el-container[el=md] {
+      .pg-el-md-#{$i} {
+        @include make-col($i, $columns);
+      }
+      .pg-el-sm-#{$i} {
+        @include make-col($i, $columns);
+      }
+    }
+
+    .pg-el-container[el=sm] {
+      .pg-el-sm-#{$i} {
         @include make-col($i, $columns);
       }
     }
   }
+
 }
 
 @include make-grid-columns();


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
@ 2019-01-24 14:01 ` Dave Page <[email protected]>
  2019-01-24 14:02   ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Page @ 2019-01-24 14:01 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Hi

Could you rebase this please?

Thanks.

On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
<[email protected]> wrote:
>
> Hi Hackers,
>
> Attached is the patch to fix controls alignment responsiveness to docker size change.
>
> Kindly review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
@ 2019-01-24 14:02   ` Dave Page <[email protected]>
  2019-01-24 14:12     ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Page @ 2019-01-24 14:02 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Oh, and what RM is it related to?

On Thu, Jan 24, 2019 at 2:01 PM Dave Page <[email protected]> wrote:
>
> Hi
>
> Could you rebase this please?
>
> Thanks.
>
> On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
> <[email protected]> wrote:
> >
> > Hi Hackers,
> >
> > Attached is the patch to fix controls alignment responsiveness to docker size change.
> >
> > Kindly review.
> >
> > --
> > Thanks and Regards,
> > Aditya Toshniwal
> > Software Engineer | EnterpriseDB Software Solutions | Pune
> > "Don't Complain about Heat, Plant a tree"
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:02   ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
@ 2019-01-24 14:12     ` Aditya Toshniwal <[email protected]>
  2019-01-24 14:20       ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Aditya Toshniwal @ 2019-01-24 14:12 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

Hi Dave,

This patch is applied and is a regression of new design changes.
 https://github.com/postgres/pgadmin4/commit/48660508ce52a34a94b41baceb3ff49bb134f22c
<https://github.com/postgres/pgadmin4/commit/48660508ce52a34a94b41baceb3ff49bb134f22c;

On Thu, Jan 24, 2019 at 7:32 PM Dave Page <[email protected]> wrote:

> Oh, and what RM is it related to?
>
> On Thu, Jan 24, 2019 at 2:01 PM Dave Page <[email protected]> wrote:
> >
> > Hi
> >
> > Could you rebase this please?
> >
> > Thanks.
> >
> > On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
> > <[email protected]> wrote:
> > >
> > > Hi Hackers,
> > >
> > > Attached is the patch to fix controls alignment responsiveness to
> docker size change.
> > >
> > > Kindly review.
> > >
> > > --
> > > Thanks and Regards,
> > > Aditya Toshniwal
> > > Software Engineer | EnterpriseDB Software Solutions | Pune
> > > "Don't Complain about Heat, Plant a tree"
> >
> >
> >
> > --
> > Dave Page
> > Blog: http://pgsnake.blogspot.com
> > Twitter: @pgsnake
> >
> > EnterpriseDB UK: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:02   ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:12     ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
@ 2019-01-24 14:20       ` Dave Page <[email protected]>
  2019-01-24 14:48         ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Page @ 2019-01-24 14:20 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Hi

On Thu, Jan 24, 2019 at 2:12 PM Aditya Toshniwal
<[email protected]> wrote:
>
> Hi Dave,
>
> This patch is applied and is a regression of new design changes. https://github.com/postgres/pgadmin4/commit/48660508ce52a34a94b41baceb3ff49bb134f22c

Oh. Not sure it worked very well. See the attached screenshot which
shows the messed-up menu bar hiding tabs.

> On Thu, Jan 24, 2019 at 7:32 PM Dave Page <[email protected]> wrote:
>>
>> Oh, and what RM is it related to?
>>
>> On Thu, Jan 24, 2019 at 2:01 PM Dave Page <[email protected]> wrote:
>> >
>> > Hi
>> >
>> > Could you rebase this please?
>> >
>> > Thanks.
>> >
>> > On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
>> > <[email protected]> wrote:
>> > >
>> > > Hi Hackers,
>> > >
>> > > Attached is the patch to fix controls alignment responsiveness to docker size change.
>> > >
>> > > Kindly review.
>> > >
>> > > --
>> > > Thanks and Regards,
>> > > Aditya Toshniwal
>> > > Software Engineer | EnterpriseDB Software Solutions | Pune
>> > > "Don't Complain about Heat, Plant a tree"
>> >
>> >
>> >
>> > --
>> > Dave Page
>> > Blog: http://pgsnake.blogspot.com
>> > Twitter: @pgsnake
>> >
>> > EnterpriseDB UK: http://www.enterprisedb.com
>> > The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Attachments:

  [image/png] Screenshot 2019-01-24 at 14.16.18.png (88.1K, 2-Screenshot%202019-01-24%20at%2014.16.18.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:02   ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:12     ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:20       ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
@ 2019-01-24 14:48         ` Aditya Toshniwal <[email protected]>
  2019-01-24 14:50           ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Aditya Toshniwal @ 2019-01-24 14:48 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgadmin-hackers

Oh it was not for mobile view screen. It was for the desktop view.

On Thu, Jan 24, 2019, 19:50 Dave Page <[email protected] wrote:

> Hi
>
> On Thu, Jan 24, 2019 at 2:12 PM Aditya Toshniwal
> <[email protected]> wrote:
> >
> > Hi Dave,
> >
> > This patch is applied and is a regression of new design changes.
> https://github.com/postgres/pgadmin4/commit/48660508ce52a34a94b41baceb3ff49bb134f22c
>
> Oh. Not sure it worked very well. See the attached screenshot which
> shows the messed-up menu bar hiding tabs.
>
> > On Thu, Jan 24, 2019 at 7:32 PM Dave Page <[email protected]> wrote:
> >>
> >> Oh, and what RM is it related to?
> >>
> >> On Thu, Jan 24, 2019 at 2:01 PM Dave Page <[email protected]> wrote:
> >> >
> >> > Hi
> >> >
> >> > Could you rebase this please?
> >> >
> >> > Thanks.
> >> >
> >> > On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
> >> > <[email protected]> wrote:
> >> > >
> >> > > Hi Hackers,
> >> > >
> >> > > Attached is the patch to fix controls alignment responsiveness to
> docker size change.
> >> > >
> >> > > Kindly review.
> >> > >
> >> > > --
> >> > > Thanks and Regards,
> >> > > Aditya Toshniwal
> >> > > Software Engineer | EnterpriseDB Software Solutions | Pune
> >> > > "Don't Complain about Heat, Plant a tree"
> >> >
> >> >
> >> >
> >> > --
> >> > Dave Page
> >> > Blog: http://pgsnake.blogspot.com
> >> > Twitter: @pgsnake
> >> >
> >> > EnterpriseDB UK: http://www.enterprisedb.com
> >> > The Enterprise PostgreSQL Company
> >>
> >>
> >>
> >> --
> >> Dave Page
> >> Blog: http://pgsnake.blogspot.com
> >> Twitter: @pgsnake
> >>
> >> EnterpriseDB UK: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >
> >
> >
> > --
> > Thanks and Regards,
> > Aditya Toshniwal
> > Software Engineer | EnterpriseDB Software Solutions | Pune
> > "Don't Complain about Heat, Plant a tree"
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop
  2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:01 ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:02   ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:12     ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
  2019-01-24 14:20       ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Dave Page <[email protected]>
  2019-01-24 14:48         ` Re: [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
@ 2019-01-24 14:50           ` Dave Page <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Dave Page @ 2019-01-24 14:50 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers

Oh, OK - well please log a ticket and fix that too then :-)

On Thu, Jan 24, 2019 at 2:48 PM Aditya Toshniwal
<[email protected]> wrote:
>
> Oh it was not for mobile view screen. It was for the desktop view.
>
> On Thu, Jan 24, 2019, 19:50 Dave Page <[email protected] wrote:
>>
>> Hi
>>
>> On Thu, Jan 24, 2019 at 2:12 PM Aditya Toshniwal
>> <[email protected]> wrote:
>> >
>> > Hi Dave,
>> >
>> > This patch is applied and is a regression of new design changes. https://github.com/postgres/pgadmin4/commit/48660508ce52a34a94b41baceb3ff49bb134f22c
>>
>> Oh. Not sure it worked very well. See the attached screenshot which
>> shows the messed-up menu bar hiding tabs.
>>
>> > On Thu, Jan 24, 2019 at 7:32 PM Dave Page <[email protected]> wrote:
>> >>
>> >> Oh, and what RM is it related to?
>> >>
>> >> On Thu, Jan 24, 2019 at 2:01 PM Dave Page <[email protected]> wrote:
>> >> >
>> >> > Hi
>> >> >
>> >> > Could you rebase this please?
>> >> >
>> >> > Thanks.
>> >> >
>> >> > On Thu, Jan 17, 2019 at 12:33 PM Aditya Toshniwal
>> >> > <[email protected]> wrote:
>> >> > >
>> >> > > Hi Hackers,
>> >> > >
>> >> > > Attached is the patch to fix controls alignment responsiveness to docker size change.
>> >> > >
>> >> > > Kindly review.
>> >> > >
>> >> > > --
>> >> > > Thanks and Regards,
>> >> > > Aditya Toshniwal
>> >> > > Software Engineer | EnterpriseDB Software Solutions | Pune
>> >> > > "Don't Complain about Heat, Plant a tree"
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Dave Page
>> >> > Blog: http://pgsnake.blogspot.com
>> >> > Twitter: @pgsnake
>> >> >
>> >> > EnterpriseDB UK: http://www.enterprisedb.com
>> >> > The Enterprise PostgreSQL Company
>> >>
>> >>
>> >>
>> >> --
>> >> Dave Page
>> >> Blog: http://pgsnake.blogspot.com
>> >> Twitter: @pgsnake
>> >>
>> >> EnterpriseDB UK: http://www.enterprisedb.com
>> >> The Enterprise PostgreSQL Company
>> >
>> >
>> >
>> > --
>> > Thanks and Regards,
>> > Aditya Toshniwal
>> > Software Engineer | EnterpriseDB Software Solutions | Pune
>> > "Don't Complain about Heat, Plant a tree"
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-01-24 14:50 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 12:32 [pgAdmin4][patch] pgadmin responsive not working as expected for desktop Aditya Toshniwal <[email protected]>
2019-01-24 14:01 ` Dave Page <[email protected]>
2019-01-24 14:02   ` Dave Page <[email protected]>
2019-01-24 14:12     ` Aditya Toshniwal <[email protected]>
2019-01-24 14:20       ` Dave Page <[email protected]>
2019-01-24 14:48         ` Aditya Toshniwal <[email protected]>
2019-01-24 14:50           ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox