react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Enhancing Form with grid layout

Open phucpnt opened this issue 7 years ago • 21 comments

Reasons for making this change

Enhancing Form with grid layout. Adding new configuration ui:layout for uiSchema.

Checklist

  • [ ] I'm updating documentation
    • [ ] I've checked the rendering of the Markdown text I've added
    • [ ] If I'm adding a new section, I've updated the Table of Content
  • [x] I'm adding or updating code
    • [ ] I've added and/or updated tests
    • [ ] I've updated docs if needed
    • [x] I've run npm run cs-format on my branch to conform my code to prettier coding style
  • [x] I'm adding a new feature
    • [x] I've updated the playground with an example use of the feature

phucpnt avatar Sep 06 '17 04:09 phucpnt

@phucpnt nobody will see it?

santosguilherme avatar Nov 29 '17 13:11 santosguilherme

this is cool but how would you handle responsive ?

revolunet avatar Jan 25 '18 22:01 revolunet

@revolunet it support desktop for grid layout. For mobile it will fallback to 1 column

phucpnt avatar Jan 26 '18 03:01 phucpnt

Hi, thanks for the PR. It looks good, but in general I would like to keep to a minimum the amount of visual/UI customization available as part of the rjsf package itself. The same way I don't want to support Material Design or Ant, I also don't want to have to support more than one layout mechanism. Is there some way that we could support this, or something like this, as a third-party extension? Are there things missing in the base rjsf library that would make doing so easier? If so, I would much rather support that, and let users/developers decide what layout they want to use in their projects.

glasserc avatar Jan 26 '18 22:01 glasserc

When will this be merged into master branch?

kharkut avatar Apr 02 '18 06:04 kharkut

@kharkut as far as I understood they are not planning to extend the project with this kind of functionality. I personally needed it too so I took the file from the merge request withLayout.js in my project and used it like in the example.

random-one avatar Apr 02 '18 10:04 random-one

I think that this should be as a separate package or in some UI package. (related #899)

MatejBransky avatar Jun 04 '18 09:06 MatejBransky

let's merge this.

zetekla avatar Nov 03 '18 03:11 zetekla

Closing this PR because we already have this functionality in withTheme.

epicfaace avatar Dec 22 '19 08:12 epicfaace

Closing this PR because we already have this functionality in withTheme.

Sorry, but I don't think that withTheme allows to build grid layouts like this PR purposes.

"ui:layout": [
      [{ firstName: 6 }, { lastName: 6 }],
      [{ password: 6 }],
      [{ age: 6 }, { telephone: 6 }],
      [{ bio: 12 }],
    ]

Fedorov113 avatar May 20 '20 19:05 Fedorov113

@Fedorov113 what I meant was, withTheme is already a HOC that allows for form theme customization. We don't need another HOC called withLayout.

We can still implement a ui:layout functionality, but this would likely need to be implemented for each theme that we support.

epicfaace avatar May 20 '20 20:05 epicfaace

@Fedorov113 what I meant was, withTheme is already a HOC that allows for form theme customization. We don't need another HOC called withLayout.

We can still implement a ui:layout functionality, but this would likely need to be implemented for each theme that we support.

Thank you for your reply.

I use this package a lot with Material UI theme, however I'm not primarily a JS developer. I really need this functionality and will try to implement it in my fork. Can you please give some advice on where to start? Is the code in the PR too outdated?

Fedorov113 avatar May 20 '20 20:05 Fedorov113

this ticket seems to be closed, Is "ui:layout" supported with latest release 1.8.1? If its supported, how would we provide the layout options in a nested schema structure, the below example provided works only in a flat schema where the object properties are at root level, how would we define if they are nested for eg, name.fn, name.ln

"ui:layout": [ [{ firstName: 6 }, { lastName: 6 }], [{ password: 6 }], [{ age: 6 }, { telephone: 6 }], [{ bio: 12 }], ]

hiitskiran avatar Jul 17 '20 17:07 hiitskiran

Can anyone share sample example for this..... @phucpnt

Mani-1112 avatar Sep 17 '20 10:09 Mani-1112

That would be great. I second the request, and would love to see the playground upgraded with this example.

Sent from my iPhone

On Sep 17, 2020, at 3:37 AM, Mani-1112 [email protected] wrote:

 Can anyone share sample example for this..... @phucpnt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mromey avatar Sep 17 '20 14:09 mromey

@Mani-1112 , @mromey you can check the sample at https://github.com/rjsf-team/react-jsonschema-form/pull/693/files#diff-5096d8cd13427dbf61c5ff143f034b98

phucpnt avatar Sep 18 '20 00:09 phucpnt

Hi,

The below syntax for layout will work on the latest rjsf package or not ? As when I tried the suggested code it didnt worked out

uiSchema: { "ui:layout": [ [{ firstName: 6 }, { lastName: 6 }], [{ password: 6 }], [{ age: 6 }, { telephone: 6 }], [{ bio: 12 }], ],

As I updated only UIschema and others do I need to add or latest rjsf package will handle? @phucpnt @epicfaace

Mani-1112 avatar Sep 18 '20 13:09 Mani-1112

@Mani-1112 the PR is not merge yet.

phucpnt avatar Sep 29 '20 14:09 phucpnt

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

stale[bot] avatar Jul 22 '22 16:07 stale[bot]

hi any news about this?

JuanHeyda avatar Aug 04 '22 20:08 JuanHeyda

@Mani-1112 https://github.com/Mani-1112 the PR is not merge yet. Really needs it to be Merged!

On Thu, Aug 4, 2022 at 3:38 PM Juan Heyda @.***> wrote:

hi any news about this?

— Reply to this email directly, view it on GitHub https://github.com/rjsf-team/react-jsonschema-form/pull/693#issuecomment-1205743182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENTFDAIXDQX7IIIFL4EHLTVXQS4PANCNFSM4DZXKIJQ . You are receiving this because you commented.Message ID: @.***>

zetekla avatar Aug 05 '22 06:08 zetekla

So much has changed since this PR was created. Especially the addition of 7 themes that this PR cannot support. Don't worry, there is effort underway to implement grid support in a MUCH richer way for all themes coming in 2023 (hopefully). Stay tuned

heath-freenome avatar Jan 30 '23 08:01 heath-freenome