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: add new code block svg file in icons folder #1805

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

mukulpadwal
Copy link
Contributor

@mukulpadwal mukulpadwal commented Nov 4, 2024

What does it do?

This PR adds a new "Code block" icon to the icon library used in Strapi. The new icon will allow for clearer differentiation between "Code block" and inline "Code" text modifiers.

Why is it needed?

The addition of this icon addresses user feedback indicating confusion between code blocks and inline code. Having a dedicated "Code block" icon will improve the user experience by making it easier to identify the block element, which is distinct from an inline modifier, and aligns with design consistency.

How to test it?

  1. Storybook Verification : Check the Storybook instance for the icon library. The CodeBlock icon should be visible along with other icons, as shown in the screenshot.

Strapi CodeBlock Icon

  1. Visual Inspection : Ensure the CodeBlock icon matches the intended design and is distinguishable from the Code icon.

Related issue(s)/PR(s)

This PR closes issue #1804 by introducing the "Code block" icon from the Phosphor library and adding it to the design system as part of the icon update process in Strapi 5.

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: 1ca7b1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@strapi/icons Minor
@strapi/design-system Minor
@strapi/ui-primitives Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 4, 2024

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

Name Status Preview Comments Updated (UTC)
design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2024 11:35am

@hanpaine
Copy link
Contributor

hanpaine commented Nov 4, 2024

Thanks for the contribution @mukulpadwal 🚀 @lucasboilly please may you take a look at this? 🙏

@hanpaine hanpaine requested a review from lucasboilly November 4, 2024 16:40
@hanpaine hanpaine added pr: enhancement This PR adds or updates some part of the codebase or features community labels Nov 4, 2024
@lucasboilly
Copy link

lucasboilly commented Nov 4, 2024

Hey @hanpaine and hey @mukulpadwal, thanks a lot! I's all good, but I don't think it will automatically fix #22058. I think we'll need to specify that that the code block should use the "CodeBlock" icon. It would require a new PR on the CMS side and I guess it's here (line 98), hope it helps!

@remidej remidej self-assigned this Nov 4, 2024
@remidej remidej changed the title feat : add new code block svg file in icons folder feat: add new code block svg file in icons folder Nov 4, 2024
@mukulpadwal
Copy link
Contributor Author

mukulpadwal commented Nov 5, 2024

Hey @lucasboilly, @hanpaine, @remidej

Yes, you’re correct! We should be able to use the CodeBlock icon once it’s merged into the Strapi Design System repo. Only then can we access it to resolve the Strapi issue.
Also, I realized I mistakenly linked this with the main issue earlier—apologies for the confusion!

Do you think it would be best to close this PR and create a new one that addresses only the design system issue?
Then, once that’s merged, we can work on the main Strapi issue with the updated CodeBlock icon.

@remidej
Copy link
Contributor

remidej commented Nov 5, 2024

@mukulpadwal thanks for you PR! Just to clarify we need these steps:

  1. merge this PR
  2. release the DS repo
  3. merge a PR that only updates the DS in the CMS repo
  4. then we can make the CMS PR to use the new icon in blocks

I can do 1 to 3 then ping you to open the final PR if that works for you

Copy link
Contributor

@remidej remidej left a comment

Choose a reason for hiding this comment

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

Could you just add a changeset file? (via CLI, see these docs) We need it for our automated releases solution

@mukulpadwal
Copy link
Contributor Author

mukulpadwal commented Nov 5, 2024

Hey @remidej, I’ve added the changeset with a detailed description. Let me know if there's anything else you'd like me to update.

@@ -0,0 +1,7 @@
---
'@strapi/icons': major
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make it a minor instead?

(I'm not sure it actually matters since the tool is in pre-release mode, but I don't want to take any chances)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@remidej changed it from major to minor.

@remidej remidej merged commit d7befb6 into strapi:main Nov 5, 2024
7 of 9 checks passed
@lucasboilly lucasboilly linked an issue Nov 7, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community pr: enhancement This PR adds or updates some part of the codebase or features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat]: New "Code block" icon
4 participants