-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Adds background to label #5959
Merged
roryabraham
merged 7 commits into
Expensify:main
from
AlfredoAlc:alfredo-fix-textinput-area
Oct 20, 2021
+26
−10
Merged
Adds background to label #5959
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
562ad4e
Adds background to label
AlfredoAlc cc08d6c
Alingned closing bracket
AlfredoAlc 93a79ba
Changes label background height to correct height
AlfredoAlc 8635982
Adds comment explaining the use of label background
AlfredoAlc 336c913
Adds overflow prop to textinput container
AlfredoAlc e6e6f89
Modifies styling syntax
AlfredoAlc d045e55
Merge branch 'Expensify:main' into alfredo-fix-textinput-area
AlfredoAlc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -521,6 +521,7 @@ const styles = { | |
justifyContent: 'center', | ||
height: '100%', | ||
backgroundColor: themeColors.componentBG, | ||
overflow: 'hidden', | ||
}, | ||
expensiTextInputLabel: { | ||
position: 'absolute', | ||
|
@@ -531,6 +532,15 @@ const styles = { | |
fontFamily: fontFamily.GTA, | ||
width: '100%', | ||
}, | ||
expensiTextInputLabelBackground: { | ||
position: 'absolute', | ||
top: 0, | ||
width: '100%', | ||
height: 25, | ||
backgroundColor: themeColors.componentBG, | ||
borderTopRightRadius: variables.componentBorderRadiusNormal, | ||
borderTopLeftRadius: variables.componentBorderRadiusNormal, | ||
}, | ||
expensiTextInputLabelDesktop: { | ||
transformOrigin: 'left center', | ||
}, | ||
|
@@ -550,6 +560,7 @@ const styles = { | |
paddingBottom: 8, | ||
paddingHorizontal: 11.5, | ||
borderRadius: variables.componentBorderRadiusNormal, | ||
zIndex: -1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please test it and it should not have any regressions. |
||
}, | ||
expensiTextInputDesktop: addOutlineWidth({}, 0), | ||
expensiTextInputAndroid: left => ({ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Am I correct in thinking that the only reason we don't add this view for single-line inputs is because of the effect it causes when an input is auto-filled? Did you see or investigate this comment?
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.
Yes, it is only set to multiline to avoid seeing the white background when it isn't multiline and it has autofill. And it look all the container blue(or whatever the color set depending on the browser).
I did investigate on it but there are some points to consider when trying to change the background set by the browser.
See #5704 (comment)
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.
Okay, well I don't think we need to worry too much about the styles applied by the browser's auto-fill, so this is probably okay for now.