dnbexperience / eufemia

DNB Design System
https://eufemia.dnb.no
Other
53 stars 32 forks source link

feat(Forms): add `Form.Card` with different default appearance than Card (use `Form.Card` in forms instead of Card) #4318

Closed tujoworker closed 5 hours ago

tujoworker commented 23 hours ago

With this we introduce Form.Card a new wrapper component for Card. It defaults to true on outset and stack. So when using it, it automatically gives the needed styles for classical forms.

Here are the docs.

Screenshot 2024-11-21 at 20 04 43

We also need to set a higher gap between the Wizard sidebar and its content:

Screenshot 2024-11-21 at 22 13 51
vercel[bot] commented 23 hours ago

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

Name Status Preview Comments Updated (UTC)
eufemia 🛑 Canceled (Inspect) Nov 22, 2024 7:56am
codesandbox-ci[bot] commented 23 hours ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

langz commented 18 hours ago

Does it exist any examples and/or internal form components which should use this new Form.Card instead of Card now?

A different way of phrasing the question above, is there any places where we should change from Card to Form.Card in our codebase?

tujoworker commented 16 hours ago

Yes, many places. I work on this right now. Many visual tests needs to be updated too.

langz commented 6 hours ago

After this PR is merged, do we still support using a Card inside of a form, in the same way we did before? Meaning it will look the same, etc.

Or will we only support Form.Card inside of a form?

If we still will support Card, do we have or need to have any screenshot tests and/or tests for this scenario?

tujoworker commented 5 hours ago

After this PR is merged, do we still support using a Card inside of a form, in the same way we did before? Meaning it will look the same, etc.

Yes.

Or will we only support Form.Card inside of a form?

No – Form.Card does only ensure more consistent and easier usage to get the correct "classical" form look.

If we still will support Card, do we have or need to have any screenshot tests and/or tests for this scenario?

We still have some for the card component. I think we have covered what we need to cover.

tujoworker commented 4 hours ago

:tada: This PR is included in version 10.57.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: