-
Notifications
You must be signed in to change notification settings - Fork 585
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
feat: Modernize Info Button Bottom Sheets #11282
feat: Modernize Info Button Bottom Sheets #11282
Conversation
</FancyModal> | ||
|
||
<AutoHeightBottomSheet visible={modalVisible} onDismiss={() => setModalVisible(false)}> | ||
<Flex mx={2} mb={4} mt={1} maxHeight={screenHeight - TOP_SCREEN_MARGIN}> |
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.
Without restricting the height (e.g., with maxHeight
), the complete modal can become higher than the screen itself. I plan to move the maxHeight
to the AutoHeightBottomSheet
because this component seems to be broken.
Also, I'm happy to hear ideas for a better solution without defining something like TOP_SCREEN_MARGIN
.

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 love this addition ❤️
{!!subTitle && ( | ||
<Text variant="xs" color="black60"> | ||
{subTitle} | ||
</Text> | ||
)} | ||
<FancyModal |
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.
One step closer to deprecate this pretty old component
https://www.notion.so/artsy/Eigen-Deprecate-FancyModal-and-use-Modal-instead-or-Modal-with-presentation-sheet-14ccab0764a08006a0d3e1e3ad5f456c
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.
Looks good, but I'd try the safeAreaInsets + padding to be more precise around spacings 👍
import { TouchableOpacity } from "react-native" | ||
|
||
// Necessary screen margin to still see the complete modal on the screen | ||
const TOP_SCREEN_MARGIN = 120 |
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.
shouldn't we use safeAreaInsets + some of our spacing as padding instead of this constant margin?
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.
We also need to keep Font scaling in mind when we use const values
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 found out about the maxDynamicContentSize prop, which works perfectly with our safeAreaInsets
.👍
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.
@dariakoko, thanks for the reminder 🙏 I've checked the modal with increased font size, and in this case, it's no issue because the content is wrapped in a ScrollView.
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.
Amazing, thank you for checking that!
4c1c6a2
79d3ded
to
d09713e
Compare
Description
Modernize Info Button Bottom Sheets.
PR Checklist
To the reviewers 👀
Changelog updates
Changelog updates
Cross-platform user-facing changes
iOS user-facing changes
Android user-facing changes
Dev changes
Need help with something? Have a look at our docs, or get in touch with us.