Add a banner in the side panel to alert if the bar chart has too many bars (#15267)

Closes https://github.com/twentyhq/core-team-issues/issues/1714

- Created `SidePanelInformationBanner` component
- Created a component state `hasWidgetTooManyGroupsComponentState`
- Displayed the banner in the side panel if the state is true



https://github.com/user-attachments/assets/343a4053-f0d5-4e9b-935d-ead191d70eb2
This commit is contained in:
Raphaël Bosi
2025-10-22 18:03:00 +02:00
committed by GitHub
parent 63a75dd182
commit 95b405edac
14 changed files with 193 additions and 25 deletions
@@ -1,5 +1,6 @@
import { PageLayoutWidgetNoDataDisplay } from '@/page-layout/widgets/components/PageLayoutWidgetNoDataDisplay';
import { GraphWidget } from '@/page-layout/widgets/graph/components/GraphWidget';
import { GraphWidgetComponentInstanceContext } from '@/page-layout/widgets/graph/states/contexts/GraphWidgetComponentInstanceContext';
import { isDefined } from 'twenty-shared/utils';
import { GraphType, type PageLayoutWidget } from '~/generated/graphql';
@@ -22,10 +23,14 @@ export const GraphWidgetRenderer = ({ widget }: GraphWidgetRendererProps) => {
}
return (
<GraphWidget
widget={widget}
objectMetadataId={widget.objectMetadataId}
graphType={graphType}
/>
<GraphWidgetComponentInstanceContext.Provider
value={{ instanceId: widget.id }}
>
<GraphWidget
widget={widget}
objectMetadataId={widget.objectMetadataId}
graphType={graphType}
/>
</GraphWidgetComponentInstanceContext.Provider>
);
};