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

Vanilla TextCell password #2249

Closed
wants to merge 8 commits into from
Closed

Vanilla TextCell password #2249

wants to merge 8 commits into from

Conversation

adammation
Copy link
Contributor

@adammation adammation commented Jan 11, 2024

The input type for a TextCell in the vanilla-renderers was 'text' and could not be changed.

This change keeps the default 'text' type but allows the type to be changed via an option "type"

"options": { "format": "password" }

See also:
https://jsonforms.discourse.group/t/input-type-with-vanilla-renderers/272

For vanilla-renderers TextCell, use "type" option to select an alternative HTML5 input type such as "email" or "password"
Copy link

netlify bot commented Jan 11, 2024

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 550fe09
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/65a048777a337c0008fcf323
😎 Deploy Preview https://deploy-preview-2249--jsonforms-examples.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 configuration.

@CLAassistant
Copy link

CLAassistant commented Jan 11, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for the contribution ❤️

In the React Material UI renderers we already support format: 'password' as the indicator to render a password field. Would this work for you too? I would prefer to be consistent between renderer sets.

@coveralls
Copy link

coveralls commented Jan 11, 2024

Coverage Status

coverage: 84.798%. remained the same
when pulling 550fe09 on adammation:vanilla-textcell-password
into fce6b1e on eclipsesource:master.

@adammation
Copy link
Contributor Author

Hi! Thanks for the contribution ❤️

In the React Material UI renderers we already support format: 'password' as the indicator to render a password field. Would this work for you too? I would prefer to be consistent between renderer sets.

Sounds great, changed to format: "password"

@adammation adammation requested a review from sdirix January 13, 2024 01:48
Comment on lines +53 to +55
type={
appliedUiSchemaOptions.format ? appliedUiSchemaOptions.format : 'text'
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
type={
appliedUiSchemaOptions.format ? appliedUiSchemaOptions.format : 'text'
}
type={appliedUiSchemaOptions.format === 'password' ? 'password' : 'text'}

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer only passing through the password as in React Material. Other types might be incompatible. I would have applied the change myself but maintainer editing was turned off for this PR

@sdirix
Copy link
Member

sdirix commented Jan 22, 2024

Closed in favor of #2254. Thanks for the contribution ❤️

@sdirix sdirix closed this Jan 22, 2024
@adammation
Copy link
Contributor Author

Thanks @sdirix !

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.

4 participants