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(Table): refactoring of types, documentation, and accordion file structure #3683

Merged
merged 9 commits into from
Jun 14, 2024

Conversation

snorrekim
Copy link
Contributor

@snorrekim snorrekim commented Jun 7, 2024

Table, TableTr, TableTd

  • added TableDocs properties
  • removed unused variant prop
  • fixed some prop types
  • added typing to TableContext

Accordion

  • moved internal accordion files to separate folder ./table-accordion
  • combined TableAccordionTd and TableAccordionTr files in to TableAccordionContent to share identical logic
  • renamed TableAccordionTd to TableAccordionContentSingle
  • renamed TableAccordionTr to TableAccordionContentRow
  • added typing to TableAccordionContext

Other

  • PropertiesTable now treats values null the same as undefined

Copy link

vercel bot commented Jun 7, 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 14, 2024 9:27am

@snorrekim snorrekim force-pushed the chore/table-refactor branch from 75ffe49 to 7af4f03 Compare June 7, 2024 09:35
@snorrekim snorrekim force-pushed the chore/table-refactor branch from 7af4f03 to a94bb95 Compare June 7, 2024 14:12
@snorrekim snorrekim force-pushed the chore/table-refactor branch from a94bb95 to c70fff6 Compare June 7, 2024 14:56
@snorrekim snorrekim force-pushed the chore/table-refactor branch from c70fff6 to ed48ff7 Compare June 7, 2024 15:29
@snorrekim snorrekim changed the title Chore/table refactor chore(Table): table refactor, Docfile Jun 10, 2024
@snorrekim snorrekim force-pushed the chore/table-refactor branch from 99aa9b2 to 4896575 Compare June 11, 2024 12:56
@snorrekim snorrekim changed the title chore(Table): table refactor, Docfile chore(Table): refactoring of types, documentation, and accordion file structure Jun 12, 2024
Copy link

codesandbox-ci bot commented Jun 13, 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.

@snorrekim
Copy link
Contributor Author

snorrekim commented Jun 13, 2024

The only real change is combining TableAccordionTr and TableAccordionTd in to one file, and renaming them to TableAccordionContentRow and TableAccordionContentSingle. Everything else is just more robust typing and moving files around.

I planned to go further, but I think I'm wasting time that could be better spend on other tasks. :)

@snorrekim snorrekim force-pushed the chore/table-refactor branch from fd75e38 to 0650490 Compare June 13, 2024 13:39
@snorrekim snorrekim marked this pull request as ready for review June 13, 2024 14:45
@snorrekim snorrekim requested a review from tujoworker June 13, 2024 14:46
Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

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

Nice work ✨

I hope its OK for you that I committed a few changes.

@tujoworker tujoworker changed the title chore(Table): refactoring of types, documentation, and accordion file structure feat(Table): refactoring of types, documentation, and accordion file structure Jun 14, 2024
@tujoworker tujoworker mentioned this pull request Jun 14, 2024
5 tasks
Copy link
Contributor

@langz langz left a comment

Choose a reason for hiding this comment

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

Looks like a great improvement 👏
I think there's a small formatting issue that leads to a bit strange colors(or perhaps the red color indicates that it's a string value?), and descriptions, and caps lock in the docs/properties https://eufemia-git-chore-table-refactor-eufemia.vercel.app/uilib/components/table/properties/

This also applies to <Tr>, <Th>, and <Td> properties docs.

I've added a red underline to the parts I'm questioning/unsure about:

Screenshot 2024-06-14 at 10 51 49

packages/dnb-eufemia/src/components/table/TableDocs.ts Outdated Show resolved Hide resolved
@snorrekim
Copy link
Contributor Author

snorrekim commented Jun 14, 2024

I'll fix the underlined text part.

And yeah, the red color is string. And the "REQUIRED" text is the most strange one because it has no value, but also need to say that, so right now it's just text, but it's the best suggestion I have for it.

@langz
Copy link
Contributor

langz commented Jun 14, 2024

I'll fix the underlined text part.

And yeah, the red color is string. And the "REQUIRED" text is the most strange one because it has no value, but also need to say that, so right now it's just text, but it's the best suggestion I have for it.

Great, thanks 🙇

@tujoworker tujoworker merged commit 6045e42 into main Jun 14, 2024
10 checks passed
@tujoworker tujoworker deleted the chore/table-refactor branch June 14, 2024 10:39
tujoworker added a commit that referenced this pull request Jun 14, 2024
Get inn these PRs:

- [x] #3706
- [x] #3581
- [x] #3683
- [x] #3709
- [x] #3708
tujoworker pushed a commit that referenced this pull request Jun 14, 2024
## [10.36.0](v10.35.0...v10.36.0) (2024-06-14)

### ✨ Features

* **Anchor:** add helper classes as props ([#3701](#3701)) ([62b23e8](62b23e8))
* **forms:** add `activeWhen` prop to Wizard.Step ([#3705](#3705)) ([edd6214](edd6214))
* **Icon:** rewrite to TypeScript and hooks ([#3703](#3703)) ([70b1f8b](70b1f8b)), closes [#3699](#3699)
* **Table:** refactoring of types, documentation, and accordion file structure ([#3683](#3683)) ([6045e42](6045e42))

### 🐛 Bug Fixes

* **Autocomplete:** make `input_value` react to prop change ([#3706](#3706)) ([641e5e7](641e5e7))
* **Autocomplete:** make inputValue update on data prop changes ([#3581](#3581)) ([83b05cf](83b05cf))
* **forms:** ensure useReactRouter to handle initial data given by url ([#3708](#3708)) ([a16f1f7](a16f1f7)), closes [#3702](#3702)
* **StepIndicator:** avoid re-assigning functions that can cause titles to be not in sync ([#3697](#3697)) ([d8d740c](d8d740c)), closes [#3685](#3685)

### 📝 Documentation

* **forms:** add translations table ([#3693](#3693)) ([84605b7](84605b7))
* **Tabs:** fix the title of Tabs breakout example ([#3696](#3696)) ([7747e06](7747e06))
* **Tabs:** improve property docs ([#3665](#3665)) ([7849cba](7849cba))
* update grid layout example without responsive sidebar ([#3709](#3709)) ([f4363c2](f4363c2))
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.36.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.

3 participants