From bc1454d0812f2266971429830af90e54c7358ff7 Mon Sep 17 00:00:00 2001 From: Lois Wells Date: Wed, 19 Nov 2025 15:20:45 +0000 Subject: [PATCH 1/2] fix plugin sidebar panel rerender issues --- src/components/Menus/Sidebar/Sidebar.jsx | 38 +++++++++++++----------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/components/Menus/Sidebar/Sidebar.jsx b/src/components/Menus/Sidebar/Sidebar.jsx index 79a503328..696e3530e 100644 --- a/src/components/Menus/Sidebar/Sidebar.jsx +++ b/src/components/Menus/Sidebar/Sidebar.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import classNames from "classnames"; import { useSelector } from "react-redux"; @@ -80,22 +80,26 @@ const Sidebar = ({ options = [], plugins = [] }) => { }, ].filter((option) => options.includes(option.name)); - let pluginMenuOptions = plugins.map((plugin) => { - return { - name: plugin.name, - icon: plugin.icon, - title: plugin.title, - position: plugin.position || "top", - panel: () => ( - - {plugin.panel()} - - ), - }; - }); + let pluginMenuOptions = useMemo( + () => + plugins.map((plugin) => { + return { + name: plugin.name, + icon: plugin.icon, + title: plugin.title, + position: plugin.position || "top", + panel: () => ( + + {plugin.panel()} + + ), + }; + }), + [plugins], + ); menuOptions = [...menuOptions, ...pluginMenuOptions]; From 98e3dc9615cd988965a16a87a86ca4e3aa946d25 Mon Sep 17 00:00:00 2001 From: Lois Wells Date: Wed, 19 Nov 2025 15:22:58 +0000 Subject: [PATCH 2/2] updating changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d66ee22c..daa715d6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +### Fixed + +- Plugin sidebar panel rerendering (#1279) + ## [0.34.1] - 2025-11-18 ### Fixed