Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFj8B-0001Eq-Ud for pgadmin-hackers@arkaria.postgresql.org; Tue, 30 May 2017 15:32:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFj8B-00079H-HV for pgadmin-hackers@arkaria.postgresql.org; Tue, 30 May 2017 15:32:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFj7x-0006kV-6X for pgadmin-hackers@postgresql.org; Tue, 30 May 2017 15:32:09 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dFj7q-0002qV-1v for pgadmin-hackers@postgresql.org; Tue, 30 May 2017 15:32:08 +0000 Received: by mail-io0-x230.google.com with SMTP id o12so58685251iod.3 for ; Tue, 30 May 2017 08:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NmveeAMI4MxAF9nXKil0+AztVe7vZGf3xwrD0L6uA1M=; b=WZ41tX88/599XMFCutGlbu0jIv2CFKPxjKQ1BEvPjGeAHg7JSLOr4biapZwkmTKbaY N9qP7D8ec+b+WkpAHBVZs6Um65JqmDepwl3clFA2Bn1OsV32QlWshexbP5Io/1wXU+28 KbzfzHbAMwScVhNJSJoiJGknSUv4kdcqCl1/8FQCikTQlcjVxfgE8r71vaFbl443dneR K2HedivRY2lXIXq9geQLA4Z7NbO64ZzjI/43afdf+CjyFrkVGt46Py3futP34jsxceqR 7dLrWCZkIgejO8jxY1zUQKkDYvYEP6eropzGtx1NUfdHIHXGsUJAjHHXbU4CBW5tIlGN P06g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NmveeAMI4MxAF9nXKil0+AztVe7vZGf3xwrD0L6uA1M=; b=jfXYX2VdHWUlsebDgN7SppCjEbK1nG0qPOgDxCsPD8CAox2mYzqHOGV9/0dotapuDX Td2kn9UdkeKMzb/Rbw4dAVjEarzLQi32e8angBpBDLkw7vamPW/tg7jRCdEutGtLG66S tA9+NL5lP61F7jg43kz27Ka+I9VwvC2IQzVEwk+B1wIZpuKKk4gepbgxlPPbVV5i3b6/ kE1Sy13Jv2A7/sl6Nj3gunaeAIihb2zDOcAJANdAgOqYVms5lH9bjTFagGVjQMEvXnWq XLKj4zWcuNzAxkMm6ddAYdMlnAFL6XaFJE7lZ1pnwXizk6x9VB8AyXdwvDTZ4VX22niy iQpg== X-Gm-Message-State: AODbwcDkdIjE/rKfoiv2RP6fPBlMNSkicUx3KB4OzKR2UQQtvHJv1u5A kjbGz30hWgAwnQosD4GEaceD7FE3AKZd X-Received: by 10.107.3.165 with SMTP id e37mr18118770ioi.232.1496158320296; Tue, 30 May 2017 08:32:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.147 with HTTP; Tue, 30 May 2017 08:31:59 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 30 May 2017 16:31:59 +0100 Message-ID: Subject: Re: [pgAdmin4][RM_2424]: Menu Items don't appear in tools menu for modules that are loaded using deps To: Surinder Kumar Cc: pgadmin-hackers Content-Type: text/plain; charset="UTF-8" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Mon, May 29, 2017 at 8:52 AM, Surinder Kumar 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers