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

Add number, string and block content icon #2

Merged
merged 3 commits into from
Nov 30, 2022
Merged

Conversation

jorngeorg
Copy link
Contributor

@jorngeorg jorngeorg commented Nov 25, 2022

This PR adds three new icons block-content, string, and number that will primarily be used to denote different fields types.

What to review:

  • naming (I was considering adding input to the name to be more specific, e.g. StringInputIcon)
  • aestethic and useability considerations

image
image
image

@@ -0,0 +1,7 @@
<svg width="26" height="25" viewBox="0 0 26 25" fill="none" xmlns="http://www.w3.org/2000/svg">

Choose a reason for hiding this comment

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

For consistency, the viewBox of this SVG should be 0 0 25 25 – similarly, width should be 25

Choose a reason for hiding this comment

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

(You may also need to revisit paths after changing this!)

fillRule="evenodd"
clipRule="evenodd"
d="M21.0126 7.59999L11.0126 7.59999V6.39999L21.0126 6.39999V7.59999Z"
fill="#101112"

Choose a reason for hiding this comment

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

All generated icon components should use currentColor

This should be possible by adjusting the colour of the source SVGs to #121923, after which the icon build process will substitute those values with currentColor, see:

// Replace Sanity black hex value with `currentColor`
code = code
.replace(/"#121923"/g, '"currentColor"')
.replace('<svg ', `<svg data-sanity-icon="${name}" `)

@robinpyon
Copy link

Thanks @jorngeorg! Will leave it to Marius to comment on aesthetics, asides from the above comments it all LGTM

@jorngeorg
Copy link
Contributor Author

Thanks, @robinpyon! Fixed the currentColor and viewBox issues.

@mariuslundgard
Copy link
Member

Sorry for slow review from my side – busy times!

Ideally the baseline/underline for these should be aligned.

image

But it's not a biggie, so will approve and we can revisit later. Let's ship this!

@vercel
Copy link

vercel bot commented Nov 30, 2022

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

Name Status Preview Updated
icons ✅ Ready (Inspect) Visit Preview Nov 30, 2022 at 11:05AM (UTC)

@github-actions
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mariuslundgard mariuslundgard deleted the findability-icons branch July 5, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants