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): implement default shape for ionic theme #29469

Merged
merged 22 commits into from
May 8, 2024
Merged

fix(input): implement default shape for ionic theme #29469

merged 22 commits into from
May 8, 2024

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented May 6, 2024

Issue number: internal


What is the current behavior?

Input doesn't provide a default shape.

What is the new behavior?

  • Input provides a default shape based on theme. md and ionic defaults to round. ios has yet to be determined, this will be done at a later time.
  • Added tests and added the shape folder
  • There were duplicate tests related to shape in other folder, those were moved them to the shape folder

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

Copy link

vercel bot commented May 6, 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 May 8, 2024 8:11pm

@thetaPC thetaPC changed the title Fw 6097 fix(input): implement default shape for ionic theme May 6, 2024
@github-actions github-actions bot added the package: core @ionic/core package label May 6, 2024
@@ -44,38 +44,17 @@ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => {
const input = page.locator('ion-input');
await expect(input).toHaveScreenshot(screenshot(`input-fill-solid-label-floating`));
});
test('should not have visual regressions with shaped solid', async ({ page }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these tests and their snapshots because I moved them under the newly made shape folder.

const input = page.locator('ion-input');
await expect(input).toHaveScreenshot(screenshot(`input-fill-shaped-solid`));
});
test('padding and border radius should be customizable', async ({ page }) => {
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 border radius customization will be tested under the newly made shape folder.

private getShape() {
const theme = getIonTheme(this);
const { shape } = this;
if (theme === 'ios' && shape === 'round') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not possible to have a round shape for the ios theme since it doesn't support an outline. I decided to add a warning.

@thetaPC thetaPC marked this pull request as ready for review May 6, 2024 23:36
@thetaPC thetaPC requested a review from a team as a code owner May 6, 2024 23:36
@thetaPC thetaPC requested review from brandyscarney and removed request for a team May 6, 2024 23:36
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These will look like md theme since the default style hasn't been implemented.

Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
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.

Great job! 👏

@thetaPC thetaPC merged commit 7333376 into ROU-4848 May 8, 2024
45 checks passed
@thetaPC thetaPC deleted the FW-6097 branch May 8, 2024 20:21
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

2 participants