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

prevent overlap of clear button, fix font, reduce space on recent statuses #8322

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Willyfrog
Copy link
Contributor

@Willyfrog Willyfrog commented Nov 8, 2024

Summary

  • clear button on long statuses was being drawn on top of the text
  • not using same font as rest of the app
  • recent status were having huge space between text and clear button

Ticket Link

MM-61129

Checklist

  • Added or updated unit tests (required for all new features)
  • Has UI changes
  • Includes text changes and localization file updates
  • Have tested against the 5 core themes to ensure consistency between them.
  • Have run E2E tests by adding label E2E iOS tests for PR.

Device Information

This PR was tested on: android and ios simulators

Screenshots

CleanShot 2024-11-08 at 12 11 22@2x

Release Note

fix UI for editing custom status

@Willyfrog Willyfrog added the E2E iOS tests for PR Run iOS E2E Detox tests label Nov 8, 2024
@Willyfrog Willyfrog added the 2: Dev Review Requires review by a core commiter label Nov 8, 2024
@github-actions github-actions bot removed the E2E iOS tests for PR Run iOS E2E Detox tests label Nov 8, 2024
Copy link
Contributor

@larkox larkox left a 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}
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it seems external keyboards on android are wired differently,
added a check onTextChange to remove any new lines

Sadly this generates a flicker, and looks like everyone is having the same problem.
CleanShot 2024-11-11 at 16 04 58

Copy link
Contributor

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

Copy link
Contributor Author

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

@enahum enahum self-requested a review November 8, 2024 23:07
Copy link
Contributor

@enahum enahum left a 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}
Copy link
Contributor

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', '')};
Copy link
Contributor

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 ?

Suggested change
return {...state, text: action.value?.replace('\n', '')};
return {...state, text: action.value?.replace('\n', ' ')};

Copy link
Contributor Author

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

@Willyfrog
Copy link
Contributor Author

@larkox gentle reminder to re-review :)

@Willyfrog Willyfrog added 3: QA Review Requires review by a QA tester and removed 2: Dev Review Requires review by a core commiter labels Nov 14, 2024
@Willyfrog Willyfrog requested review from lindy65 and removed request for rahimrahman November 14, 2024 10:38
@lindy65 lindy65 added the Build Apps for PR Build the mobile app for iOS and Android to test label Nov 14, 2024
Copy link

@lindy65 lindy65 left a 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

@lindy65 lindy65 added 4: Reviews Complete All reviewers have approved the pull request and removed Build Apps for PR Build the mobile app for iOS and Android to test 3: QA Review Requires review by a QA tester labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request QA Review Done release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants