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: disable broken header collapse on ios #2250

Merged
merged 8 commits into from
Mar 27, 2024
Merged

Conversation

jfmcquade
Copy link
Collaborator

@jfmcquade jfmcquade commented Mar 20, 2024

PR Checklist

  • PR title descriptive (can be used in release notes)

Description

Disables the header collapse functionality on iOS, which was buggy, see #2242. Now on iOS, setting the APP_HEADER_DEFAULTS.collapse property to true has no effect. The other two properties introduced by #2216, variant and colour, still behave as expected on iOS.

After spending considerable time trying to get the current header collapse implementation to work on iOS, I concluded that doing so would require a rethink of that implementation, see follow-up issue #2249 for more details.

Testing

Whilst altering the config properties and seeing their effects on a local build is not possible without a Mac, I have uploaded an iOS build to appetize here.

The functionality should be identical to that on other platforms when the collapse property is set to false. There is an additional visual element in that on iOS there is additional safe area padding applied at the top of the screen to accommodate the native UI elements and notch, if present. This means the header can appear quite tall on some iOS devices, as it covers the whole top section of the screen.

The config settings for this build were as follows:

config.app_config.APP_HEADER_DEFAULTS.collapse = true;
config.app_config.APP_HEADER_DEFAULTS.colour = "primary";
config.app_config.APP_HEADER_DEFAULTS.variant = "default";

Git Issues

Closes #2242 , which is superseded by #2249

Screenshots/Videos

Demonstration of scrolling working as expected on iOS

Config 1

config.app_config.APP_HEADER_DEFAULTS.collapse = true;
config.app_config.APP_HEADER_DEFAULTS.colour = "primary";
config.app_config.APP_HEADER_DEFAULTS.variant = "default";

iPhone SE

A phone with no top notch/cutout

true.primary.default.SE.mov

iPhone 15

A phone with a top cutout

true.primary.default.15.mov

Config 2

config.app_config.APP_HEADER_DEFAULTS.collapse = true;
config.app_config.APP_HEADER_DEFAULTS.colour = "none";
config.app_config.APP_HEADER_DEFAULTS.variant = "compact";

iPhone SE

A phone with no top notch/cutout

true.none.compact.SE.mov

iPhone 15

A phone with a top cutout

true.none.compact.15.mov

Copy link
Collaborator

@esmeetewinkel esmeetewinkel left a comment

Choose a reason for hiding this comment

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

Functional test passed on Appetize emulator.

Looking at the emulator I found one other header issue

  • Background colour of device header (network / time / notifications / battery etc) same as app header on iOS
    Whereas on my Android device the device header of our apps is grey (whereas for some other apps it does inherit the colour from the app). e.g.
    image image

And a few more issues which are unrelated:

  • Notifications permission pop-up **app_name** is not populated
    I can't remember seeing the equivalent notification when opening the app on Android. Do you give this permission at a different stage on Android?
    image

  • iOS: icons of the Button card-portrait appear at the top of the page
    template comp_button
    image image instead of image

@jfmcquade
Copy link
Collaborator Author

jfmcquade commented Mar 27, 2024

Thanks, @esmeetewinkel. I've broken out your findings into issues, details below.

  • Background colour of device header (network / time / notifications / battery etc) same as app header on iOS
    Whereas on my Android device the device header of our apps is grey (whereas for some other apps it does inherit the colour from the app).

#2261

  • Notifications permission pop-up **app_name** is not populated

This appears to just be a result of me manually changing the iOS config files to include our custom app name, and not doing so correctly. I have since built using the yarn workflow ios command available in the feature branch for #2256, and this pop-up correctly contains the value of app_name:

Screenshot 2024-03-27 at 15 54 08

I've also uploaded the build to appetize here.

  • iOS: icons of the Button card-portrait appear at the top of the page

#2262

@github-actions github-actions bot removed the fix label Mar 27, 2024
@chrismclarke chrismclarke merged commit 6f3cc05 into master Mar 27, 2024
6 checks passed
@chrismclarke chrismclarke deleted the feat/ios-header branch March 27, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] iOS: header behaviour
3 participants