Skip to content

enhancement! : remove all field label, field hint, field errors from all possible inputs #1693

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

Merged
merged 30 commits into from
Apr 24, 2024

Conversation

madhurisandbhor
Copy link
Contributor

@madhurisandbhor madhurisandbhor commented Apr 16, 2024

What does it do?

  • This removes field component from inputs wherever not needed. At some places we just need to pass aria-label and no label is required but existing inputs forces us to add it. So to simplify it in V2, we are going to have plain inputs without any labels, hints(description) or error messages.
  • Updated stories and moved those inputs under stories/Inputs folder
  • Tests updated accordingly

Why is it needed?

As a developer I don’t want complete inputs e.g. that contain a FieldHint / Label etc. I just want “inputs”

How to test it?

Please check stories for updated inputs.

Related Issues

  • resolves DX-1197

@madhurisandbhor madhurisandbhor added pr: enhancement This PR adds or updates some part of the codebase or features source: design-system relates to design-system package labels Apr 16, 2024
@madhurisandbhor madhurisandbhor self-assigned this Apr 16, 2024
Copy link

changeset-bot bot commented Apr 16, 2024

🦋 Changeset detected

Latest commit: 9351af9

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

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

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 Apr 16, 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 Apr 24, 2024 7:28am
design-system-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2024 7:28am

@joshuaellis
Copy link
Contributor

These are all breaking changes, lets not forget to update BREAKING_CHANGES.md and also add the relevant changesets file too.

Copy link
Contributor

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

You've deleted a lot of the stories, but why not create a formula for how to document Inputs in storybook? We should be showing how to use them as a field too.

We're also inconsistent on the naming of components sometimes its XInput sometimes its just X, what do other design-systems do in these circumstances?

Copy link
Contributor

github-actions bot commented Apr 17, 2024

Size Change: -3.39 kB (-1%)

Total Size: 487 kB

Filename Size Change
packages/strapi-design-system/dist/index.js 194 kB -1.7 kB (-1%)
packages/strapi-design-system/dist/index.mjs 192 kB -1.69 kB (-1%)
ℹ️ View Unchanged
Filename Size
packages/primitives/dist/index.js 16.6 kB
packages/primitives/dist/index.mjs 16.1 kB
packages/strapi-icons/dist/index.js 22.1 kB
packages/strapi-icons/dist/index.mjs 21.7 kB
packages/strapi-icons/dist/symbols-index.js 12 kB
packages/strapi-icons/dist/symbols-index.mjs 11.9 kB

compressed-size-action

@madhurisandbhor madhurisandbhor force-pushed the feat/remove-field-comp-wrappers branch from 2177b71 to 6511c08 Compare April 18, 2024 14:10
Copy link
Contributor

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

Nearly there 💪🏼

i've done some polishing on 8887e02

However, we've missed the DatePicker and DateTimePicker components, they also need to have their "field" stuff removed, i'm gonna make a follow-up ticket to review the Field API, I think this can be improved before the next beta.

@madhurisandbhor
Copy link
Contributor Author

Thank you for changes, and about datepicker I dont know my search didn't find it because I had a space added, but I will make those changes quickly 👍

Copy link
Contributor

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

TFO2mwVPIFoOJcuTSC

My face hitting approve

@joshuaellis
Copy link
Contributor

also, dont forget to squash and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: 💥 Breaking change This PR contains breaking changes and should not be merged pr: enhancement This PR adds or updates some part of the codebase or features source: design-system relates to design-system package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: ToggleInput renders two labels
2 participants