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

refactor(searchbar): update default styles for ionic theme #29917

Open
wants to merge 14 commits into
base: next
Choose a base branch
from

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Oct 1, 2024

Issue number: internal


What is the current behavior?

Ionic theme: Searchbar does not match design.

What is the new behavior?

  • Updated styles
  • Added snapshots

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

Copy link

vercel bot commented Oct 1, 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 Oct 3, 2024 11:27pm

@@ -143,19 +143,6 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
await expect(searchbar).toHaveScreenshot(screenshot(`searchbar-color`));
});

test('should render disabled searchbar', 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.

Moved this to the states test folder.

@thetaPC thetaPC marked this pull request as ready for review October 1, 2024 22:37
@thetaPC thetaPC requested a review from a team as a code owner October 1, 2024 22:37
core/src/components/searchbar/searchbar.ionic.scss Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Actually do we need this file since we are already using tokens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this file because I wanted the padding logic separate so it would be easier to read. Plus, if one of them changes like gap then the dev wouldn't have to worry about updating padding start or end. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Should the arrow be flipped here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought that too but it's not flipped in md. I ended up just leaving it as is.


transform: translateY(-50%);
font-size: globals.$ionic-font-size-400;
Copy link
Member

Choose a reason for hiding this comment

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

Should this use scale?

Copy link
Contributor Author

Choose a reason for hiding this comment

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


/* Hover */
:host(:hover) {
--icon-color: #{globals.$ionic-color-neutral-900};
Copy link
Member

Choose a reason for hiding this comment

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

I am seeing color/neutral/800 in Figma on hover, is this right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. It seems that the only thing that changes is the background: 127027c

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.

3 participants