Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
490d284d75 chore(deps): bump actions/setup-python from 6.3.0 to 7.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.3.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](ece7cb06ca...5fda3b95a4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 07:06:43 +00:00
3 changed files with 2 additions and 73 deletions

View File

@@ -40,7 +40,7 @@ jobs:
uses: ./.github/actions/setup-supersetbot/
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"

View File

@@ -48,50 +48,10 @@ const mockProps: TabsRendererProps = {
tabBarPaddingLeft: 16,
};
// Mirrors the tab label markup of Tab.tsx: the title lives in a
// .dragdroppable-tab container and renders as a textarea via EditableTitle
const draggableTabProps: TabsRendererProps = {
...mockProps,
editMode: true,
tabItems: [
{
...mockTabItems[0],
label: (
<div className="dragdroppable-tab">
<span className="editable-title">
<textarea defaultValue="Tab 1" />
</span>
</div>
),
},
mockTabItems[1],
],
};
// jsdom implements no PointerEvent, so @dnd-kit's PointerSensor never activates
class MockPointerEvent extends MouseEvent {
isPrimary: boolean;
pointerId: number;
constructor(type: string, init: PointerEventInit = {}) {
super(type, init);
this.isPrimary = init.isPrimary ?? true;
this.pointerId = init.pointerId ?? 1;
}
}
// eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks
describe('TabsRenderer', () => {
const { PointerEvent: OriginalPointerEvent } = globalThis;
beforeEach(() => {
jest.clearAllMocks();
globalThis.PointerEvent = MockPointerEvent as typeof PointerEvent;
});
afterEach(() => {
globalThis.PointerEvent = OriginalPointerEvent;
});
test('renders tabs container with correct test attributes', () => {
@@ -239,29 +199,4 @@ describe('TabsRenderer', () => {
expect(screen.getByText('Tab 1 Content')).toBeInTheDocument();
expect(screen.queryByText('Tab 2 Content')).not.toBeInTheDocument(); // Not active
});
test('drags from the tab title and shows the drag indicator only then', () => {
render(<TabsRenderer {...draggableTabProps} />);
const container = screen.getByTestId('dashboard-component-tabs');
const title = container.querySelector('textarea') as HTMLTextAreaElement;
// At rest the title keeps the text cursor it sets on itself
expect(container).not.toHaveStyleRule('cursor', 'move', {
target: '.dragdroppable-tab *',
});
// Pressing on the title and moving past the sensor's distance constraint
// has to start a drag: the title covers most of the tab, so a tab that
// cannot be dragged from there cannot really be dragged at all
fireEvent.pointerDown(title, { button: 0, isPrimary: true, clientX: 0 });
fireEvent.pointerMove(document, {
button: 0,
isPrimary: true,
clientX: 50,
});
expect(container).toHaveStyleRule('cursor', 'move', {
target: '.dragdroppable-tab *',
});
});
});

View File

@@ -72,16 +72,10 @@ const StyledTabsContainer = styled.div<{ isDragging?: boolean }>`
}
}
/* Hide ink-bar during drag */
${({ isDragging }) =>
isDragging &&
`
/* Show the drag indicator during drag, over the tab title textarea too.
The doubled parent outranks the title's own cursor; a single & loses. */
&& .dragdroppable-tab * {
cursor: move;
}
/* Hide ink-bar during drag */
.ant-tabs-card > .ant-tabs-nav .ant-tabs-ink-bar,
.ant-tabs > .ant-tabs-nav .ant-tabs-ink-bar {
display: none !important;