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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: search input line break #10167

Closed
wants to merge 2 commits into from
Closed

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Apr 29, 2024

This PR resolves ONYX-931

Description

This PR fixes an issue where the search input placeholder breaks on Android.
The issue comes from React-native and is still not fixed even in the latest version.

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 馃憖

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

  • search input placeholder cropped - mounir

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

// See https://github.com/facebook/react-native/issues/29663
const SEARCH_INPUT_PLACEHOLDER =
Platform.OS === "android" && Dimensions.get("screen").width - 150 < 250
? "Search artists, artworks, etc"
Copy link
Member Author

Choose a reason for hiding this comment

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

Here I am simply sending a short version of the placeholder for small devices

Copy link
Member

Choose a reason for hiding this comment

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

Suggestion (non-blocking): Although this fixes the issue that was reported, I believe that implementing something similar to the workaround (that was introduced here) over all inputs would be a better solution

Copy link
Member Author

Choose a reason for hiding this comment

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

this was unfortunately not used anywhere after this PR so I removed it from palette. Let me check again if I should bring that back

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 his solution was nice but I'd rather avoid having a shadow element in the tree, if we could have something like Pavlos did but once we're done with the measuring we get rid of the shadow element from the tree would be nice, if it's not too much work 馃憤

@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Android user-facing changes (search input placeholder cropped - mounir)

Generated by 馃毇 dangerJS against b201507

@MounirDhahri
Copy link
Member Author

Here we go artsy/palette-mobile#225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants