JSON visualizer: Highlight the parent nodes of in-use nodes (#11373)

https://github.com/user-attachments/assets/5f31023d-b24f-40c8-a061-ffc0d02b63b0

Closes https://github.com/twentyhq/core-team-issues/issues/715
This commit is contained in:
Baptiste Devessier
2025-04-03 12:11:19 +02:00
committed by GitHub
parent 4a4e65fe4a
commit 144a326709
9 changed files with 66 additions and 7 deletions

View File

@ -447,6 +447,26 @@ export const BlueHighlighting: Story = {
},
};
export const PartialBlueHighlighting: Story = {
args: {
value: {
name: 'John Doe',
age: 30,
address: {
city: 'Paris',
},
},
getNodeHighlighting: (keyPath: string) =>
keyPath === 'address' ? 'partial-blue' : undefined,
},
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
const ageElement = await canvas.findByText('age');
expect(ageElement).toBeVisible();
},
};
export const RedHighlighting: Story = {
args: {
value: {