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

Implement iOS "Cancel" button #5376

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

Jon-edge
Copy link
Collaborator

@Jon-edge Jon-edge commented Nov 29, 2024

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-11-28.at.17.04.37.mp4

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch 5 times, most recently from e988822 to 1bcff4b Compare November 29, 2024 20:35
Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

I added a fixup commit with some of my feedback suggetions. Though, there are still broken scenes remaining:

Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 12 42 03
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 12 41 44
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 12 41 16

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch from 181f90a to fbb4356 Compare November 29, 2024 21:05
Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

Please fix all the regression that I found by checking ever scene where SimpleTextInput is implemented.

Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 37 09
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 37 03
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 35 39
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 35 13
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 34 54

Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 34 51
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 34 30
Simulator Screenshot - iPhone 15 Pro - 2024-11-29 at 13 33 35

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch from fbb4356 to 5f06ba6 Compare November 29, 2024 23:59
@Jon-edge
Copy link
Collaborator Author

Jon-edge commented Nov 30, 2024

Seems we need to wrap another container around the component since originally it had the default flex properties on the outermost container, while the new container needs different flex properties.

@samholmes
Copy link
Contributor

Seems we need to wrap another container around the component since originally it had the default flex properties on the outermost container, while the new container needs different flex properties.

Why does the outer-most container view need flexShrink/flexGrow rules?

Copy link
Member

@paullinator paullinator left a comment

Choose a reason for hiding this comment

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

Please provide screenshots of all locations this component is used before merging this PR. This UI corruption is pretty badly broken

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch 2 times, most recently from 4b38a59 to 6f58008 Compare December 3, 2024 21:19
Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

A few things left-over and missed

padding: theme.rem(1),
margin: -theme.rem(1)
}))

const CancelButton = styled(Animated.View)<{
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace Animated.View for View.

}
})

const CancelText = styled(Animated.Text)(theme => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace Animated.View for View.

textAlign: 'center',
whiteSpace: 'nowrap',
minWidth: theme.rem(4),
flexShrink: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove minWidth in favor of margins.

alignItems: 'center',
justifyContent: 'center',
marginLeft: theme.rem(0.5),
opacity: isFocused ? 1 : 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Use same margins on each side instead of a minWidth on the text:

marginHorizontal: theme.rem(0.5),

@samholmes
Copy link
Contributor

Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 09 41
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 09 06
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 08 44
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 08 21
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 08 19
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 08 04
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 07 40
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 07 36
Simulator Screenshot - iPhone 15 Pro - 2024-12-04 at 13 05 54

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch from 6f58008 to c6107e7 Compare December 5, 2024 00:11
@Jon-edge
Copy link
Collaborator Author

Jon-edge commented Dec 5, 2024

image
image
image
image
image
image
image

@Jon-edge Jon-edge force-pushed the jon/ios-text-input-cancel branch from c6107e7 to 352c9cb Compare December 5, 2024 20:57
@Jon-edge Jon-edge enabled auto-merge December 5, 2024 20:57
@Jon-edge Jon-edge disabled auto-merge December 5, 2024 23:02
@Jon-edge Jon-edge merged commit 680897f into develop Dec 5, 2024
2 checks passed
@Jon-edge Jon-edge deleted the jon/ios-text-input-cancel branch December 5, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants