Skip to content

fix: added readonly state variant to passwordInput #17031

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

Conversation

riddhybansal
Copy link
Contributor

Closes #16922

PasswordInput does not have readonly state

Changelog

New

  • Added readonly state and test cases for the same

Testing / Reviewing

Check if readonly state of passwordInput is working as intented.

@riddhybansal riddhybansal requested review from a team as code owners July 24, 2024 09:16
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5a8451e
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66bc789279b92800085cbcdf
😎 Deploy Preview https://deploy-preview-17031--v11-carbon-react.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.

Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5a8451e
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66bc7892438ee80009c16abd
😎 Deploy Preview https://deploy-preview-17031--carbon-elements.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.

Copy link
Contributor

@2nikhiltom 2nikhiltom left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@alisonjoseph alisonjoseph 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 the show/hide icon is missing styling for readOnly, I believe it should use the $icon-disabled token, and not have any hover states/cursor change.

@riddhybansal
Copy link
Contributor Author

Looks like the show/hide icon is missing styling for readOnly, I believe it should use the $icon-disabled token, and not have any hover states/cursor change.

I thought of a same but I could see hover things in disabled state as well , thought its what designed. So do we need to use the $icon-disabled token, and not have any hover states/cursor changes for both disable and readOnly state

@riddhybansal
Copy link
Contributor Author

Looks like the show/hide icon is missing styling for readOnly, I believe it should use the $icon-disabled token, and not have any hover states/cursor change.

I thought of a same but I could see hover things in disabled state as well , thought its what designed. So do we need to use the $icon-disabled token, and not have any hover states/cursor changes for both disable and readOnly state

Fixed for both disable and readonly state

@alisonjoseph alisonjoseph requested review from a team and laurenmrice and removed request for a team July 25, 2024 13:55
Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

I had one question about the cursor, I'm wondering if the show/hide cursor shouldn't change on hover when in readonly. @laurenmrice?

@Kritvi-bhatia17 Kritvi-bhatia17 self-requested a review August 2, 2024 08:26
Copy link
Contributor

@Kritvi-bhatia17 Kritvi-bhatia17 left a comment

Choose a reason for hiding this comment

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

I had one question about the cursor, I'm wondering if the show/hide cursor shouldn't change on hover when in readonly. @laurenmrice?

Hi @alisonjoseph @riddhybansal,

I checked the readonly state for Combobox and NumberInput (which have interactive elements similar to PasswordInput) and noticed that the cursor does not change on hover.
However, @laurenmrice can confirm this for further validation.

Screen.Recording.2024-08-02.at.1.49.44.PM.mov

Also, a small doubt: are we planning to add the readonly state to the FluidPasswordInput as well?

Copy link
Member

@laurenmrice laurenmrice left a comment

Choose a reason for hiding this comment

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

@Kritvi-bhatia17 @riddhybansal

When hovering over the eye icon button in the read-only state, the cursor should be an arrow and not a pointer. We use the pointer cursor when you can actually interact with the icon button when its no longer in the read-only state.
Frame 1

@riddhybansal riddhybansal force-pushed the PasswordInput_readonly_state branch from e568771 to f2cb668 Compare August 8, 2024 09:55
@Kritvi-bhatia17
Copy link
Contributor

Also, a small doubt: are we planning to add the readonly state to the FluidPasswordInput as well?

Hi @riddhybansal, could you please confirm this?

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

This LGTM. Did you want to add to the fluid version also, or create a new issue?

@Kritvi-bhatia17 do we already have issues for design to add to Figma? Looks like read-only states are missing there also. 👀

@riddhybansal
Copy link
Contributor Author

This LGTM. Did you want to add to the fluid version also, or create a new issue?

@Kritvi-bhatia17 do we already have issues for design to add to Figma? Looks like read-only states are missing there also. 👀

I guess there are missing read only states for many fluid components we can tackle them together as a list of task maybe

Copy link
Member

@laurenmrice laurenmrice left a comment

Choose a reason for hiding this comment

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

Yeah, lets add the fluid in at a future date in a separate PR. Looks good to me @riddhybansal ! ⭐️

@riddhybansal riddhybansal added this pull request to the merge queue Aug 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 14, 2024
@riddhybansal riddhybansal added this pull request to the merge queue Aug 14, 2024
Merged via the queue into carbon-design-system:main with commit 695ef81 Aug 14, 2024
22 checks passed
@riddhybansal riddhybansal deleted the PasswordInput_readonly_state branch August 14, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: PasswordInput doesn't have read only styling
5 participants