Re: [pgadmin-hackers] [pgAdmin4][RM_2424]: Menu Items don't appear intools menu for modules that are loaded using deps - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [pgadmin-hackers] [pgAdmin4][RM_2424]: Menu Items don't appear intools menu for modules that are loaded using deps
Date
Msg-id CA+OCxoyEdD3hLj8CKe8kUtGoSD3GiqxYFB-E622AOmu1jKPAYg@mail.gmail.com
Whole thread Raw
In response to [pgadmin-hackers] [pgAdmin4][RM_2424]: Menu Items don't appear in tools menu formodules that are loaded using deps  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
List pgadmin-hackers
Hi

On Mon, May 29, 2017 at 8:52 AM, Surinder Kumar
<surinder.kumar@enterprisedb.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


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] pgAdmin 4 commit: Cleanup handling ofdefault/null values when data edi
Next
From: Dave Page
Date:
Subject: Re: [pgadmin-hackers] [pgAdmin4][Patch] Add property in trigger nodeto display if trigger is enabled or not