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(forms): add edit and view containers to Form.Section #3652

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

tujoworker
Copy link
Member

@tujoworker tujoworker commented Jun 5, 2024

Copy link

vercel bot commented Jun 5, 2024

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

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 2:26pm

Copy link

codesandbox-ci bot commented Jun 5, 2024

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.

@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from a463fd6 to 57cd03c Compare June 5, 2024 07:49
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from 57cd03c to 837f7f6 Compare June 6, 2024 07:00
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from 837f7f6 to 6bcf429 Compare June 6, 2024 11:10
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch 4 times, most recently from 2546933 to b77de7c Compare June 6, 2024 11:32
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch 5 times, most recently from d5e3d88 to ac9b9a1 Compare June 6, 2024 11:56
@tujoworker tujoworker requested a review from langz June 6, 2024 11:57
@tujoworker tujoworker marked this pull request as ready for review June 6, 2024 11:57
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from ac9b9a1 to a5118eb Compare June 6, 2024 12:12
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from a5118eb to b2b1b99 Compare June 6, 2024 20:16
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from b2b1b99 to b5482ec Compare June 6, 2024 20:24
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from 7543fc8 to 2d6c7fa Compare June 7, 2024 10:39
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch 2 times, most recently from fb1379e to 11c0545 Compare June 7, 2024 11:01
@langz
Copy link
Contributor

langz commented Jun 7, 2024

One experience testing the EditContainer, is that I don't feel like it works 100% as intended/described, but I believe perhaps the problem is that the example is opened by default.

In our docs it says, The "Cancel" button resets any changes made to the item content, restoring it to its original state..

But in the following example https://eufemia-git-feat-form-section-edit-view-containers-eufemia.vercel.app/uilib/extensions/forms/Form/Section/EditContainer/#demos and video, it doesn't reset the "etternavn"-field(it still shows "a"):

Screen.Recording.2024-06-07.at.13.02.06.mov

@langz
Copy link
Contributor

langz commented Jun 7, 2024

I'm a bit confused about the edit and view container of Section and Iterate, and how they are "intertwined" with each other, or if they are just separate stuff.

In this PR, there are multiple files where I would assume we care about the edit and view container of Iterate, and not Section, but where we've in this PR changed to care about Section in an "Iterate"-file.
For instance in the file Iterate/EditContainer/__tests__/EditAndViewContainer.test.tsx, we now query for .dnb-forms-section-block and not .dnb-forms-iterate-block which we did before this PR, and which I would assume is correct, since the test file is in Iterate/EditContainer/.

https://github.com/dnbexperience/eufemia/pull/3652/files#diff-5de40ef30a8ee79350a42cf7087760651b7aeadb35fff5c9503c1227114a58b8

I'm not sure if this is intended and it's some kind of "refactoring/renaming" that I don't seem to see(iterate vs. section), as the tests seems to pass, or if it's just the result of a bit too fast "search and replace".

This pattern/observation occurs in multiple "iterate"-files.

@tujoworker
Copy link
Member Author

I'm a bit confused about the edit and view container of Section and Iterate, and how they are "intertwined" with each other, or if they are just separate stuff.

Yes, only the styles are shared at the moment. But I guess we should look into sharing also the React code from Seciton.EditContainer with -> Iterate.EditContainer.

Co-authored-by: Anders <anderslangseth@gmail.com>
@tujoworker tujoworker force-pushed the feat/form-section-edit-view-containers branch from a2a65d8 to e3193ba Compare June 7, 2024 14:15
@tujoworker
Copy link
Member Author

tujoworker commented Jun 7, 2024

One experience testing the EditContainer, is that I don't feel like it works 100% as intended/described, but I believe perhaps the problem is that the example is opened by default.

Very nice finding 💯 This has been fixed 👍 and tests where added.

@langz
Copy link
Contributor

langz commented Jun 7, 2024

One experience testing the EditContainer, is that I don't feel like it works 100% as intended/described, but I believe perhaps the problem is that the example is opened by default.

Very nice finding 💯 This has been fixed 👍 and tests where added.

Great work @tujoworker, thanks⭐️

@tujoworker tujoworker merged commit 51bf7a2 into main Jun 10, 2024
9 checks passed
@tujoworker tujoworker deleted the feat/form-section-edit-view-containers branch June 10, 2024 12:17
tujoworker pushed a commit that referenced this pull request Jun 11, 2024
## [10.35.0](v10.34.1...v10.35.0) (2024-06-11)

### 📝 Documentation

* add link to Eufemia's GitHub repository in menu bar ([#3670](#3670)) ([cdecbb3](cdecbb3))
* fix heading levels ([#3660](#3660)) ([d0bb28d](d0bb28d))
* **Forms:** fix broken link to forms/Wizard/Container ([#3656](#3656)) ([53cb041](53cb041))
* **Forms:** reqruied -> required ([#3655](#3655)) ([be82a51](be82a51))
* remove demos ([#3668](#3668)) ([90638ce](90638ce))

### 🐛 Bug Fixes

* add support for ::selection color for Chromium based browsers ([#3689](#3689)) ([6e49a9b](6e49a9b))
* **forms:** add help button to Field.Option ([#3678](#3678)) ([9210281](9210281))
* **forms:** ensure help button is rendered only once in Toggle and Boolean fields ([#3675](#3675)) ([d9e9478](d9e9478))
* **forms:** solve issue when schema is used in Wizard ([#3680](#3680)) ([8699b0c](8699b0c))
* **TextCounter:** exceeded message when variant up ([#3688](#3688)) ([22f1507](22f1507))

### ✨ Features

* **assets:** add sbanken logo svgs ([#3674](#3674)) ([1d7bcc0](1d7bcc0))
* **filter:** add support to filter array data based on wildcard `*` ([#3679](#3679)) ([1d93ac4](1d93ac4))
* **forms:** add edit and view containers to `Form.Section` ([#3652](#3652)) ([51bf7a2](51bf7a2))
* **forms:** add help property to ArraySelection field ([#3694](#3694)) ([f6b1224](f6b1224))
* **HelpButton:** ensure larger bounding area when size is set to small ([#3677](#3677)) ([97ca056](97ca056))
* **Logo:** Refactor Logo to ts ([#3611](#3611)) ([b1ca771](b1ca771))
* **NumberFormat:** add monospace support ([#3669](#3669)) ([940ddb6](940ddb6))
* refactor internal translation logic to not mutate the root context ([#3691](#3691)) ([49b0b45](49b0b45))
* **Table:** added handle to collapse all accordion rows ([#3666](#3666)) ([c09a697](c09a697))
* **Translation:** add support for type-safe keys ([#3681](#3681)) ([437ba83](437ba83))
@tujoworker
Copy link
Member Author

🎉 This PR is included in version 10.35.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants