-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix: change field style colors when input is not editable #25991
fix: change field style colors when input is not editable #25991
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@Santhosh-Sellavel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
I have read the CLA Document and I hereby sign the CLA |
@shawnborton have a look at the attached videos in the PR, ALL DISABLED INPUTS will have no border and will have cursor: disabled. Looks good to me, what are your views? (especially in step 2 where some fields are disabled and others are not. there must other forms in the app too, where we have a mix of enabled and disabled fields.) |
Hmm I don't know that we should use the disabled cursor there. They aren't technically disabled inputs, they are just read-only text. So I think I would opt to do nothing here. |
@shawnborton okay! removing the disabled cursor. |
@Santhosh-Sellavel please review now |
@shawnborton removed |
Looks good, thanks! |
@@ -264,6 +264,8 @@ function BaseTextInput(props) { | |||
|
|||
// When autoGrow is on and minWidth is not supplied, add a minWidth to allow the input to be focusable. | |||
props.autoGrow && !textInputContainerStyles.minWidth && styles.mnw2, | |||
// Remove border bottom when field is not editable. | |||
!isEditable && styles.borderNone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you have time, could provide screenshots that shows the difference when we have this line and not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawnborton This needs to be implemented in the text input component only. because we not only want this to happen in bank details, we want to provide this UX to all the disabled inputs globally.
@himanshuragi456 I'd like to ask a clarifying question here 🙇 What issue are we trying to solve now?
This was the original issue. Now because we don't have to use disabled cursors now, what are we tying to do in this PR? |
@hayata-suenaga Yes, we don't have to use a disabled cursor now, but the basic idea still remains that we need to help the user identify that the particular field is not editable. I'll edit the Title. |
Done! do we need any other changes? please review @Santhosh-Sellavel @hayata-suenaga @shawnborton |
Good on my end. Thanks! |
@himanshuragi456 What to test & verify here. Can you update the test steps here thanks! |
@shawnborton This would affect the date picker are we fine with this? Left side New & Right Side old![]() |
@Santhosh-Sellavel just need to observe that the fields that are not editable, don't have a border bottom anymore. I've updated the same in the test steps. |
@himanshuragi456 What are the pages that do have uneditable fields, please list them down. So it will be helpful for QA to test them. |
We should not be touching the datepicker dropdown. That's why I suggested
to not use a disabled input for this, we should just make it read-only text
instead.
…On Tue, Aug 29, 2023 at 3:29 PM Santhosh Sellavel ***@***.***> wrote:
@himanshuragi456 <https://github.com/himanshuragi456> What are the pages
that do have uneditable fields, please list them down. So it will be
helpful for QA to test them.
—
Reply to this email directly, view it on GitHub
<#25991 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARWH5XQW5ABKXPSQSZ3NWTXXY7H5ANCNFSM6AAAAAA37THCBA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Santhosh-Sellavel it is the base text input we are dealing with, so that will affect a lot of forms, difficult to list all of them. For testing, bank account form step 1 and step 2 are good enough for testing here. |
I think it makes sense to make it read-only text. Only on the page where it's meant to be read-only Ex: Profile page. There are flows where it will be both editable & disabled. There we just continue using TextInput and just disable it whenever required. If we try to make it a read-only pattern while temporarily disabled that would be over-engineering. In this case, we just add a disabled cursor style or just do nothing! cc: @hayata-suenaga |
Hmm I am not following your suggestion, mind rephrasing? |
@Santhosh-Sellavel @shawnborton @hayata-suenaga This issue has already taken a lot of effort and will still take more effort to resolve the console warning. I request to remove the penalty that will be applied due to the late merging of this PR and increase the bounty for this issue. |
Penalties are waived when a delay happens because of something beyond our control. Here we had one such case, i.e. we just deviated from the expected outcome here on the PR.
IMO this is something which within our control, this could have been caught just running through the checklist conciously.
Please try to complete the requested changes soon, thanks! cc: @hayata-suenaga |
@himanshuragi456 I answered your payment question on the GH issue. |
@Santhosh-Sellavel solved the console error and added comments. please review. |
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hayata-suenaga Please verify workflow checks are good, otherwise LGTM, tests well!
Also, I think this could wait for Merge Freeze, I let you make the final call though thanks!
cc: @shawnborton Please verify screenshots!
Screenshots generally look good but I noticed that web has a bottom-border on the inputs but iOS does not. Why is there an inconsistency there? |
@himanshuragi456 could you check this ⬆️ |
Everything is good on my end. |
@hayata-suenaga I think we can move forward now. Let me know if there are any further changes required! |
@hayata-suenaga gently bump here |
sorryyy I missed this one thank you for letting me know 😄 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.69-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.69-2 🚀
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.70-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.70-8 🚀
|
Details
A separate(dull/disabled-looking) style will be provided to fields that are not editable, to provide clear understanding to the user that the field is disabled.
Fixed Issues
$ #25577
PROPOSAL: #25577 (comment)
Tests
Offline tests
same as online steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android