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

feat: Modernize Info Button Bottom Sheets #11282

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

olerichter00
Copy link
Contributor

@olerichter00 olerichter00 commented Dec 13, 2024

Description

Modernize Info Button Bottom Sheets.

Before After
Simulator Screenshot - iPhone 16 - 2024-12-13 at 15 15 49 Simulator Screenshot - iPhone 16 - 2024-12-13 at 15 15 38

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

  • Modernize Info Button Bottom Sheets - ole

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.

Sorry, something went wrong.

@olerichter00 olerichter00 self-assigned this Dec 13, 2024
@olerichter00 olerichter00 marked this pull request as draft December 13, 2024 14:18
</FancyModal>

<AutoHeightBottomSheet visible={modalVisible} onDismiss={() => setModalVisible(false)}>
<Flex mx={2} mb={4} mt={1} maxHeight={screenHeight - TOP_SCREEN_MARGIN}>
Copy link
Contributor Author

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.

Bildschirmfoto 2024-12-13 um 15 27 50

MounirDhahri
MounirDhahri previously approved these changes Dec 13, 2024
Copy link
Member

@MounirDhahri MounirDhahri left a 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
Copy link
Member

Choose a reason for hiding this comment

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

araujobarret
araujobarret previously approved these changes Dec 13, 2024
Copy link
Contributor

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

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?

Copy link
Contributor

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

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 found out about the maxDynamicContentSize prop, which works perfectly with our safeAreaInsets.👍

Copy link
Contributor Author

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.

Copy link
Contributor

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!

dariakoko
dariakoko previously approved these changes Dec 13, 2024
@olerichter00 olerichter00 marked this pull request as ready for review December 13, 2024 15:30
@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Dec 13, 2024

This PR contains the following changes:

  • Cross-platform user-facing changes (Modernize Info Button Bottom Sheets - ole - olerichter00)

Generated by 🚫 dangerJS against dd21448

@olerichter00 olerichter00 added the Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green label Dec 13, 2024
@olerichter00 olerichter00 force-pushed the olerichter00/modernize-info-button-bottom-sheets branch from 79d3ded to d09713e Compare December 13, 2024 15:40
@artsy-peril artsy-peril bot merged commit 6979723 into main Dec 16, 2024
7 checks passed
@artsy-peril artsy-peril bot deleted the olerichter00/modernize-info-button-bottom-sheets branch December 16, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants