Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(SplitButton): remove dataTestId props from nested elements #2199

Merged
merged 4 commits into from
Jul 2, 2024
Merged
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: 1 addition & 1 deletion packages/core/docs/vibe-3-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
- We're now accepting instead of static props, inline string, e.g. "bottom-start". We need to change DialogPosition to be a string in its root declaration (this also requires big codemod changes probably) [codemod]
- Requires codemod for when people used secondaryDialogPosition={SplitButton.secondaryBlaBla}. [codemod]
- Once changing DialogPosition to be a const, instead of enum, remove DialogPosition double declaration from SplitButton's declaration [internal]

- Remove `data-testId` prop from nested elements

### Steps

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/components/Menu/MenuItem/MenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable react/jsx-props-no-spreading */
import React, { AriaAttributes, ForwardedRef, ReactElement, forwardRef, useMemo, useRef } from "react";
import { DialogPosition } from "../../../constants";
import Tooltip, { TooltipProps } from "../../../components/Tooltip/Tooltip";
import Icon from "../../../components/Icon/Icon";
import useIsOverflowing from "../../../hooks/useIsOverflowing/useIsOverflowing";
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/SplitButton/SplitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const SplitButton: FC<SplitButtonProps> & {
onBlur={setNotHovered}
disabled={disabled}
loading={loading}
data-testid={dataTestId || getTestId(ComponentDefaultTestId.SPLIT_BUTTON_PRIMARY_BUTTON, id)}
data-testid={getTestId(ComponentDefaultTestId.SPLIT_BUTTON_PRIMARY_BUTTON, id)}
>
{children}
</Button>
Expand Down Expand Up @@ -269,7 +269,7 @@ const SplitButton: FC<SplitButtonProps> & {
ariaLabel={SECONDARY_BUTTON_ARIA_LABEL}
ariaHasPopup
ariaExpanded={isDialogOpen}
data-testid={dataTestId || getTestId(ComponentDefaultTestId.SPLIT_BUTTON_SECONDARY_BUTTON, id)}
data-testid={getTestId(ComponentDefaultTestId.SPLIT_BUTTON_SECONDARY_BUTTON, id)}
>
<div className={styles.secondaryButtonIconWrapper}>
<DropdownChevronDown aria-hidden="true" />
Expand Down