-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
prevent overlap of clear button, fix font, reduce space on recent statuses #8322
base: main
Are you sure you want to change the base?
Conversation
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.
Minor comments, but approving preemptively.
@@ -83,11 +80,11 @@ const CustomStatusInput = ({emoji, isStatusSet, onChangeText, onClearHandle, onO | |||
style={style.input} | |||
secureTextEntry={false} | |||
underlineColorAndroid='transparent' | |||
multiline={true} |
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.
Do we want custom status to be multiline? Or am I missing something?
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.
no, just the display of it to wrap around and use multiple lines instead of scrolling
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.
I think that adding multiline allows you to add line breaks, which is probably not desired. I wonder if we should reconsider how these input work visually. But 0/5 on whether it should be in this PR or 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.
I couldn't add line breaks into the status using the iOS simulator.
I'll double check with a real device to make sure
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.
even if the iOS simulator does not allow you to add line breaks, the Android one does.
I cannot seem to find a way to wrap the text in the input in multiple lines without having multi-line enabled.
Perhaps what you can do is before submitting the text of the status, you could just modify it to remove all line breaks if there are any and potentially replace them with spaces.
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.
Not there.. before sendin the text to the action or in the action itself
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.
moved to the reducer action
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.
approving as not to block as the other review is already addressing the same concern. I did provide a potential solution, so If you apply it, do ask for my review again.
@@ -83,11 +80,11 @@ const CustomStatusInput = ({emoji, isStatusSet, onChangeText, onClearHandle, onO | |||
style={style.input} | |||
secureTextEntry={false} | |||
underlineColorAndroid='transparent' | |||
multiline={true} |
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.
even if the iOS simulator does not allow you to add line breaks, the Android one does.
I cannot seem to find a way to wrap the text in the input in multiple lines without having multi-line enabled.
Perhaps what you can do is before submitting the text of the status, you could just modify it to remove all line breaks if there are any and potentially replace them with spaces.
@@ -128,7 +128,7 @@ function reducer(state: NewStatusType, action: { | |||
return state; | |||
} | |||
case 'text': | |||
return {...state, text: action.value}; | |||
return {...state, text: action.value?.replace('\n', '')}; |
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.
should this be a space instead ?
return {...state, text: action.value?.replace('\n', '')}; | |
return {...state, text: action.value?.replace('\n', ' ')}; |
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.
That intentional, in my head it made more sense to ignore the input rather than having a space, but I'm 1/5 and easily convinced as I don't know what the right behavior could be
@larkox gentle reminder to re-review :) |
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.
Thanks @Willyfrog - tested on Android and iOS and this is fixed
Summary
Ticket Link
MM-61129
Checklist
E2E iOS tests for PR
.Device Information
This PR was tested on: android and ios simulators
Screenshots
Release Note