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

From: Surinder Kumar <[email-masked]>
Date: Mon, 29 May 2017 13:22:00 +0530

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.

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Tue, 30 May 2017 16:31:59 +0100

Hi

On Mon, May 29, 2017 at 8:52 AM, Surinder Kumar
<[email-masked]> wrote:
> Issue:

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