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

fix: bring back headers when using "modal" presentation on Android #2372

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Oct 2, 2024

Description

Recently, when adding formSheets I've also merged some code for future modals implementation.
When detaching the yet-unused code for modals from being used I've forgotten about one code place,
causing the header to not be created.

modal presentation is rather not widely used on Android, because it has no real differences from push,
however I'm restoring the old behavior for the sake of backward compatibility.

Kudos to @alduzy for noticing the issue.

Changes

  • Fixed the condition that prevents the header from being created on Android, right now header
    is not created only for formSheet stack presentation.

Test code and steps to reproduce

Test1649 - set 'modal' stack presentation to any screen and do not disable the header. See that it now works.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

Co-authored-by: Alex Duzy <alex.duzy@swmansion.com>
@kkafar kkafar force-pushed the @kkafar/bring-back-headers-in-modals branch from 385003b to a7a07a1 Compare October 2, 2024 15:53
@kkafar kkafar requested a review from alduzy October 2, 2024 15:53
Copy link
Member

@alduzy alduzy left a comment

Choose a reason for hiding this comment

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

🚀

@kkafar kkafar merged commit b3f189d into main Oct 3, 2024
4 checks passed
@kkafar kkafar deleted the @kkafar/bring-back-headers-in-modals branch October 3, 2024 08:05
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this pull request Oct 9, 2024
…oftware-mansion#2372)

## Description

Recently, when adding formSheets I've also merged some code for future
modals implementation.
When detaching the yet-unused code for modals from being used I've
forgotten about one code place,
causing the header to not be created.

`modal` presentation is rather not widely used on Android, because it
has no real differences from `push`,
however I'm restoring the old behavior for the sake of backward
compatibility.

Kudos to @alduzy for noticing the issue.

## Changes

* Fixed the condition that prevents the header from being created on
Android, right now header
    is not created only for `formSheet` stack presentation.


## Test code and steps to reproduce

`Test1649` - set 'modal' stack presentation to any screen and do not
disable the header. See that it now works.

## Checklist

- [x] Included code example that can be used to test this change
- [ ] Ensured that CI passes

Co-authored-by: Alex Duzy <alex.duzy@swmansion.com>
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.

2 participants