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

fix(input): add focus ring to the clear input button for ionic theme #29409

Merged
merged 2 commits into from May 3, 2024

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Apr 26, 2024

Issue number: internal


What is the current behavior?

When a user tabs into the clear icon button within ion-input, it does not display a focus ring. This was displaying prior but this PR caused it to stop displaying without realizing it.

What is the new behavior?

  • The focus ring now displays as intended.

Does this introduce a breaking change?

  • Yes
  • No

Other information

This is for the ionic theme.

Copy link

vercel bot commented Apr 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 6:17pm

@github-actions github-actions bot added the package: core @ionic/core package label Apr 26, 2024
@@ -214,7 +212,7 @@ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, config }
await expect(clearButton).toBeVisible();

// ensure blurring native input doesn't immediately hide clear button
await page.keyboard.press('Tab');
await pageUtils.pressKeys('Tab');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change to be consistent and to use the Tab logic for all OSs.

@thetaPC thetaPC marked this pull request as ready for review April 29, 2024 17:40
@thetaPC thetaPC requested a review from a team as a code owner April 29, 2024 17:40
@thetaPC thetaPC requested review from brandyscarney and removed request for a team April 29, 2024 17:40
Copy link
Contributor

@sean-perkins sean-perkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have screenshot coverage for the focus ring on the clear button for the ionic theme?

core/src/components/input/input.ionic.scss Show resolved Hide resolved
@brandyscarney brandyscarney changed the title fix(input): add focus ring clear input for ionic theme fix(input): add focus ring to the clear input button for ionic theme May 1, 2024
const clearButton = input.locator('.input-clear-icon');
clearButton.evaluate((el: HTMLElement) => el.classList.add('ion-focused'));
await page.waitForChanges();
await pageUtils.pressKeys('Tab');

const container = page.locator('#container');
await expect(container).toHaveScreenshot(screenshot(`input-clear-button-focused`));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenshots were not updated because no visual changes happened. The focus ring is still the same shape, size, color, etc.

@thetaPC thetaPC merged commit 2eb1dbd into ROU-4848 May 3, 2024
44 checks passed
@thetaPC thetaPC deleted the FW-6204 branch May 3, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants