Skip to content

fix(example): show the Create button before a download starts - #4463

Closed
mickeypause wants to merge 1 commit into
rnmapbox:mainfrom
mickeypause:fix/example-offline-region-create
Closed

mickeypause wants to merge 1 commit into
rnmapbox:mainfrom
mickeypause:fix/example-offline-region-create

Conversation

@mickeypause

Copy link
Copy Markdown

Description

The Cache / Offline → Change Offline Region example scene can't download anything. Its buttons, Create included, are rendered inside the status bubble, and that bubble only shows once a download has reported status. The only way to start a download is Create, so the scene shows just the map.

This shows the Create button in a bubble until the first status arrives. After that, the scene works as before.

Found while reproducing #4460.

Screenshots

iPhone 16 Pro simulator, iOS 27.

Before (main) After: Create shown After: tapping Create

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder (n/a: example-only change)
  • I have tested the new feature on /example app.
    • In V11 mode/ios (the example app is v11 + New Architecture only)
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example) (n/a: this fixes a sample)

Testing

  • iOS: opened the scene on main (map only, no buttons), then with this change: Create appears, and tapping it downloads the pack to completion (18 resources, 66,291,486 bytes).
  • Android: not run with this exact change. The same temporary Create button was used on Android while reproducing fix(android): send 64-bit values to JS without truncating them #4460, and downloads worked there.
  • ESLint passes on the changed file.

Component to reproduce the issue you're fixing

Open Cache / Offline → Change Offline Region in the example app. On main there's nothing to tap; with this change, tap Create.

The Change Offline Region scene only rendered its buttons, Create
included, once a download had reported status. Nothing starts a
download except Create, so the scene could never download anything.

This branch was previously deployed

1 inactive deployment
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.

1 participant