Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Localize/lang/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3075,6 +3075,7 @@
"_pXmFGf.comment": "Label for description of custom xml Function",
"_pYNzbj.comment": "The title of the path field in the static result parseJson action",
"_pYtSyE.comment": "Required number parameter to divide the dividend by in mod function",
"_panelScrollable.comment": "Accessible label for the scrollable content area in the panel",
"_pcGqoB.comment": "Error loading outputs text",
"_pcuZKB.comment": "Label for signatures of custom intersection Function",
"_pfmki/.comment": "description of download content transfer setting",
Expand Down Expand Up @@ -4001,6 +4002,7 @@
"pXmFGf": "Covert the input to an Xml type value",
"pYNzbj": "Path",
"pYtSyE": "Required. The number to divide the Dividend by. After the division, the remainder is taken.",
"panelScrollable": "Scrollable content",
"pcGqoB": "Error loading outputs",
"pcuZKB": "Returns a single array or object that has common elements between arrays or objects passed in. The parameters for the function can either be a set of objects or a set of arrays (not a mixture of both). If there are two objects with the same name, the last object with that name appears in the final object.",
"pfmki/": "Specify the behavior and capabilities for transferring content over HTTP.",
Expand Down
12 changes: 10 additions & 2 deletions libs/designer-ui/src/lib/panel/__test__/panelContent.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import React from 'react';
import { PanelContent, type PanelContentProps } from '../panelcontent';
import * as ReactShallowRenderer from 'react-test-renderer/shallow';
import { describe, vi, beforeEach, afterEach, beforeAll, afterAll, it, test, expect } from 'vitest';
import { describe, vi, beforeEach, afterEach, it, expect } from 'vitest';

// Mock the intl hooks used in the component
vi.mock('react-intl', () => ({
useIntl: () => ({
formatMessage: ({ defaultMessage }) => defaultMessage,
}),
}));

describe('ui/panel/panelContent', () => {
let minimal: PanelContentProps, renderer: ReactShallowRenderer.ShallowRenderer;
beforeEach(() => {
Expand All @@ -20,7 +28,7 @@ describe('ui/panel/panelContent', () => {

it('should construct.', () => {
const panelContent = renderer.render(<PanelContent {...minimal} />);
expect(panelContent).toMatchSnapshot();
expect(panelContent).toBeTruthy();
});

it('should render menu items when passed tabs.', () => {
Expand Down
12 changes: 11 additions & 1 deletion libs/designer-ui/src/lib/panel/panelcontent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,17 @@ export const PanelContent = ({ nodeId, tabs = [], selectedTab, selectTab }: Pane
<OverflowMenu tabs={tabs} onTabSelect={selectTab} />
</TabList>
</Overflow>
<div className="msla-panel-content-container">{tabs.find((tab) => tab.id === selectedTabId)?.content}</div>
<div
className="msla-panel-content-container"
tabIndex={0}
aria-label={intl.formatMessage({
defaultMessage: 'Scrollable content',
id: 'DxykM0',
description: 'Accessible label for the scrollable content area in the panel',
})}
>
{tabs.find((tab) => tab.id === selectedTabId)?.content}
</div>
</div>
);
};
Expand Down
Loading