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

Table widget #53

Merged
merged 22 commits into from
Apr 5, 2022
Merged

Table widget #53

merged 22 commits into from
Apr 5, 2022

Conversation

sverhoeven
Copy link
Member

@sverhoeven sverhoeven commented Mar 14, 2022

In PR #50 we have several parameters which are array of objects. These can be rendered as a table in the form.

localhost_6006__path=_story_tablefield--array-of-objects-as-table

Table examples can be found in

  • kitchensink catalog -> node5
  • expert + guru catalog -> rigidbody -> symmetry or ad abnitio mode
  • yarn storybook

The usage of the table widget is document in the new docs/ui/Schema.md file. Also the other ui fields are documented in this file (fixes #51).

Should be merged after #50 as this PR branches of from it.

@netlify
Copy link

netlify bot commented Mar 14, 2022

Deploy Preview for wonderful-noether-53a9e8 ready!

Name Link
🔨 Latest commit 3cdbea8
🔍 Latest deploy log https://app.netlify.com/sites/wonderful-noether-53a9e8/deploys/624c37f45d628a0009dbb4f8
😎 Deploy Preview https://deploy-preview-53--wonderful-noether-53a9e8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sverhoeven sverhoeven marked this pull request as ready for review March 22, 2022 17:18
@sverhoeven sverhoeven requested a review from Peter9192 March 22, 2022 17:18
@Peter9192
Copy link
Contributor

@sverhoeven can you merge origin/main into this branch?

@sverhoeven
Copy link
Member Author

Main has been merged

Copy link
Contributor

@Peter9192 Peter9192 left a comment

Choose a reason for hiding this comment

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

Looks decent and seems to work well. Did I understand correctly that you already used this code elsewhere? Would it make sense to point to the source? Also, happy to see the extended documentation. Have you considered contributing some of these options back to react-json-schema-form? Would it make sense?

src/table/TableFieldTemplate.css Outdated Show resolved Hide resolved
? (
<label>
{s.title}
<span className='required'>*</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have an example of required parameters in the kitchensink or storyboards?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, I have added a storybook and found that * was not shown everywhere it should have. Now it is shown in the column head and in popup.

@sverhoeven
Copy link
Member Author

Looks decent and seems to work well. Did I understand correctly that you already used this code elsewhere? Would it make sense to point to the source? Also, happy to see the extended documentation. Have you considered contributing some of these options back to react-json-schema-form? Would it make sense?

Thanks for reviewing.

I have added a comment to point to the source at https://github.com/iomega/paired-data-form/blob/master/app/src/fields/TableFieldTemplate.tsx

I was thinking of making something similar to https://github.com/RXNT/react-json-schema-form-extras , but have not had the time yet

@sverhoeven sverhoeven merged commit ee2de9b into main Apr 5, 2022
@sverhoeven sverhoeven deleted the table-widget branch April 5, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document CollapsibleField
2 participants