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 1 commit
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
rivka-ungar marked this conversation as resolved.
Show resolved Hide resolved

### Steps

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