From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 338C21FF16F for ; Tue, 2 Sep 2025 14:22:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6601112310; Tue, 2 Sep 2025 14:22:26 +0200 (CEST) Message-ID: <45d9895b-fe91-44cc-a275-43c88fb697e9@proxmox.com> Date: Tue, 2 Sep 2025 14:22:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox Datacenter Manager development discussion References: <20250829145313.329114-1-s.hanreich@proxmox.com> <20250829145313.329114-30-s.hanreich@proxmox.com> <57b9ed69-c0d4-420b-8669-2e9e3b603151@proxmox.com> <4aa5b76a-a070-4658-b594-e5ec61ee0f62@proxmox.com> <907667a5-aae1-4c50-b1cb-5b2373c56447@proxmox.com> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <907667a5-aae1-4c50-b1cb-5b2373c56447@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.708 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH proxmox-datacenter-manager v2 14/15] ui: sdn: add evpn overview panel X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" On 9/2/25 11:30 AM, Dominik Csapak wrote: > On 9/2/25 8:34 AM, Dominik Csapak wrote: >> >> >> On 9/1/25 5:02 PM, Stefan Hanreich wrote: >>> On 9/1/25 3:44 PM, Dominik Csapak wrote: >>>> one question: couldn't have the toolbar stayed the same as before? >>>> >>>> as in, create the toolbar in line in the `main_view` and just `clone()` >>>> it once for each panel? >>>> >>>> not that i'm totally against factoring such things out, but the >>>> `EvpnToolbar` does not do anything special FWICT, so creating >>>> the toolbar inline would have been fine... >>> >>> I had that initially, but cloning the toolbar had issues with the >>> positioning of the dropdown (it was stuck to the top left of the >>> screen). Not cloning the toolbar but creating it twice fixed it for me. >>> >> >> this sounds like a bug we should fix ;) >> >> i'll see how that happens and see if i can send a fix for that. >> >> for the time being we can ofc leave it as is and clean up when we have >> a fix >> >> > > for the record for the list: > > the issue here was that every component in our toolkit has a > 'NodeRef' (in their std_props) that is linked to a Dom element on rendering > > In the MenuButton we use this NodeRef from the std_props as the anchor > for aligning the menu. > > When we clone some component's properties, we clone the NodeRef too > but that messes up the references to the dom, since now the clone > points to the same noderef > > The first rendered menu works fine, but when the second one is rendered > the link from noderef <-> dom changes to the second one. Now when one is > trying to use the menu on the first tab, the noderef points to an > element which is invisible, which fails to align properly. > > We're still deciding how to cope with cloning properties and their > node_refs (we could make it optional, make sure aligning always > require internal node_refs, impl clone such that the nodref > is not copied, etc) > > the easiest fix here is to simply have a > > fn create_toolbar(...) -> Toolbar > > function that returns a new toolbar each time > and use that twice. This is still much shorter > than having a full component for basically the `view` method. > > Can be cleaned up as a follow-up IMO I'll send a v3 (together with the other nit), shouldn't be too hard to change imo. _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel