Re: [pgAdmin4][RM_2424]: Menu Items don't appear in tools menu for modules that are loaded using deps

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][RM_2424]: Menu Items don't appear in tools menu for modules that are loaded using deps
Date: 2017-05-30 15:31:59
Message-ID: CA+OCxoyEdD3hLj8CKe8kUtGoSD3GiqxYFB-E622AOmu1jKPAYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Mon, May 29, 2017 at 8:52 AM, Surinder Kumar
<surinder(dot)kumar(at)enterprisedb(dot)com> wrote:
> Hi
>
> Issue:
>
> If modules are loaded without any node dependency(i.e: on page load), the
> function 'create_menu' is called implicitly to generate menu items.
>
> But when the modules are loaded when its dependent node expands, the
> function 'create_menus' has to explicitly call after 'add_menus' from
> respective module's template files.
>
> This patch is dependent on patch 'load_modules_js_when_required.patch'
>
> Please find attached patch and review.

Unfortunately I just realised why this change isn't so good - it
causes the menus to be built when JS is loaded. That's not good, as we
really want the Tools menu to list all items, all of the time - it's
important that menu stays consistent so that users don't get confused
when they find an option they expected to be there, isn't.

Is there any way you can think of to have the menu items added at
startup, but the rest of the code loaded as needed?

Of course, whatever we do with Grunt/webpack will make this moot
anyway, so don't spend much time on it..

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-05-30 15:43:57 Re: [pgAdmin4][Patch] Add property in trigger node to display if trigger is enabled or not
Previous Message Dave Page 2017-05-30 15:22:28 Re: pgAdmin 4 commit: Cleanup handling of default/null values when data edi