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

Customizing @material-ui TextWidget requires me to customize ALL of the TextWidget wrapped widgets #2512

Closed
1 task
heath-freenome opened this issue Aug 11, 2021 · 9 comments · Fixed by #2515 or #2519
Closed
1 task

Comments

@heath-freenome
Copy link
Member

heath-freenome commented Aug 11, 2021

Prerequisites

Description

Unlike the core wrappers around BaseInput (i.e. EmailWidget, PasswordWidget, etc) which pull the BaseInput component out of the registry.widgets object, the ones for material-ui instead directly import the TextWidget from the source code hierarchy. As a result, because I've created a custom extension of the TextWidget I now need to create custom replacements for ALL of the TextWidget wrappers (i.e. EmailWidget, PasswordWidget, etc).

If the material-ui implementation were to pull the TextWidget from the registry (like core does) instead of directly importing it, then I would not need to override every one of the TextWidget wrappers myself.

Version

v3.0.2

@epicfaace
Copy link
Member

Yeah, that would be a good change. Do you know if this is the case for all other themes as well? Would you be willing to add a PR to fix it?

@heath-freenome
Copy link
Member Author

I haven't looked at the other themes... I can try pushing a PR... at least for the source changes in material-ui

@heath-freenome
Copy link
Member Author

heath-freenome commented Aug 11, 2021

It seems to be similar for EmailWidget (and thus likely the other wrappers) in the two other typescript libraries (bootstrap-4 and fluent)... I'll do my best to fix those... I'm assuming I push one PR for all the packages?

@heath-freenome
Copy link
Member Author

Wow... that's a lot of vulnerabilities:

react-jsonschema-form(master|✔) % npm install

> react-jsonschema-form@2.0.0-alpha.1 postinstall /Users/heath/dev/public/react-jsonschema-form
> lerna bootstrap

lerna notice cli v3.18.4
lerna info Bootstrapping 7 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna success Bootstrapped 7 packages
added 62 packages from 37 contributors, removed 12 packages, updated 47 packages and audited 903 packages in 156.649s

11 packages are looking for funding
  run `npm fund` for details

found 408 vulnerabilities (357 low, 33 moderate, 18 high)
  run `npm audit fix` to fix them, or `npm audit` for details

@heath-freenome
Copy link
Member Author

So the bootstrap4 changes were causing me too many problems and I aborted on them. I'll let somebody else figure it out.

@heath-freenome
Copy link
Member Author

Also, what's the command to regenerate the snapshots for material-ui?

@epicfaace
Copy link
Member

epicfaace commented Aug 12, 2021 via email

@heath-freenome
Copy link
Member Author

@epicfaace I have a PR but can't push it... What is the process?

remote: Permission to rjsf-team/react-jsonschema-form.git denied to heath-freenome.
fatal: unable to access 'https://github.com/rjsf-team/react-jsonschema-form.git/': The requested URL returned error: 403

@epicfaace
Copy link
Member

epicfaace commented Aug 12, 2021 via email

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