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

feat(input): add item highlight for ionic theme #29395

Merged
merged 5 commits into from Apr 29, 2024

Conversation

sean-perkins
Copy link
Contributor

Issue number: N/A


What is the current behavior?

The current border implementation causes layout shift.

What is the new behavior?

  • Matches MD highlight effect for the focus border
  • Border implementation does not cause layout shift

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link

vercel bot commented Apr 24, 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 26, 2024 2:29pm

@github-actions github-actions bot added the package: core @ionic/core package label Apr 24, 2024
@sean-perkins sean-perkins marked this pull request as ready for review April 24, 2024 20:58
@sean-perkins sean-perkins requested a review from a team as a code owner April 24, 2024 20:58
@sean-perkins

This comment was marked as resolved.

@@ -111,6 +111,26 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
const input = page.locator('ion-input');
await expect(input).toHaveScreenshot(screenshot(`input-fill-outline`));
});

test('focus state should not have visual regressions', async ({ page }) => {
Copy link
Contributor

@thetaPC thetaPC Apr 24, 2024

Choose a reason for hiding this comment

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

This seems to be a duplicate of this existing test. What's the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm didn't know the outline focus status was being captured already. It didn't catch the border width reducing from 2px to 1px (accidental earlier diff).

Let me try a few things locally, such as splitting the images to see if it can detect the change.

I can remove the added test from this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to also remove the screenshots that were created from the tests.

Sometimes, it doesn't capture because the change is very minor. You have to delete the screenshot so it can generate a fresh one.

This test case is already handled in the input/test/states test suite.
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Code looks good and it works to fix the highlight. Makes sense to copy the highlight code from the md theme. 👍

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM

@sean-perkins sean-perkins merged commit e0dfb61 into ROU-4848 Apr 29, 2024
44 checks passed
@sean-perkins sean-perkins deleted the sp/input-highlight branch April 29, 2024 14:41
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