wix / wix/react-native-ui-lib

Modal props missing from Hint component

Open
#3,938 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
7.2k
Forks
748
Avg merge
2d 18h
Merged PRs (30d)
1

Description

Description

There's no ability to pass modal props to the Hint component and this causes an issue with my app due to needing to add supportedOrientations

Related to
  • Components
  • Demo
  • Docs
  • Typings
Steps to reproduce
  1. Set up an app that is locked to landscape. For example in expo set this value in your app config: orientation: "landscape"
  2. Add a hint component that uses a modal. This happens to me as long as I provide the prop onBackgroundPress i.e. I don't need to pass useModal to get this error
  3. On dismissing the hint, see the following error
Image
Expected behavior

Allow passing modalProps, similar to the Dialog component

Environment

expo: ~54.0.25
react-native-ui-lib: 8.2.2
uilib-native: 5.0.1

Affected platforms
  • Android
  • iOS
  • Web

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Hint component and compare its modal handling with the Dialog component, focusing on how modal props are exposed. Reproduce the issue in an iOS landscape-locked Expo app with onBackgroundPress, then verify that passing modalProps such as supportedOrientations prevents the dismissal error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.