Repository navigation
fix(ios): move a Pocket card to the top of its screen instead of sliding up a copy - #1423
Open
valentinfernandez1 wants to merge 89 commits into
Open
valentinfernandez1 wants to merge 89 commits into
valentinfernandez1 wants to merge 89 commits into
Conversation
The Widget under an opened Pocket card can show or hide the face above it through a new widget-only ExpandedCard trait (wire id 23), and a card definition's faceShown sets where the face starts. The host sizes the Widget to the space the face leaves and never locks the face against the user.
…ate test RUNTIME.md now lists ExpandedCardHost with the other platform traits and says what a connection without one answers. The placeholder test from the protocol PR duplicated expanded_card_without_an_adapter_is_unsupported; its reason moves into that test's doc. The runtime borrows the adapter instead of cloning it.
…ocket test host setup RUNTIME.md said Platform combines every listed trait except the optional ones, which included ExpandedCardHost by omission; it now says the hook travels per connection and is in neither set. The trait doc no longer compares it with PermissionStatusHost, which is installed process-wide. ExpandedCardFaceOutcome derives SCALE Encode/Decode like HostContactPick, matching the codec codegen publishes for it. The Pocket and expanded card test hosts share one setup.
…s faceShown: false
A debug product with no published app showed "Couldn't load this product." under its Pocket card. The product form now takes an App URL on 127.0.0.1; the card's page loads from it with the card query appended, keeping the product's identity through the session, the permission client and the bridge bootstrap, which can no longer read it from the host. The form also gains an "Open with the face away" switch for debug cards.
…ed card has settled The fold cleared its dragging flag before the release animation ran, so a request in that window was answered applied and then dropped by the animation lock.
…, and document the expanded card dev loop Clears the stale opening value when another card is selected, corrects the opening-fold comment, and describes the App URL and face-away fields, the live expanded card loop and faceShown in the Android dev-loop doc and the sample README.
Host the expanded product only for the card still selected, withdraw a face request's reply when the core stops waiting so the fold does not move after a NotPresented answer, clear a deleted product's debug App URL, and make faceShown explicit at every PocketCardDefinition and DebugPocketCard construction.
…view A card's WebView is served from the product's widget executable on the base-domain origin, as iOS does, and the card warm-up fetches that same archive; a product with no widget falls back to its base host rather than running its app as a Widget. The opening-face lookup waits up to five seconds, since the page waits on the same product resolution anyway. A card fading out no longer answers the next card's face requests. The session starter derives the execution kind from the card it is given, and the debug App URL is refused unless it is a loopback http url.
…hat the card hosts return
…e page below it The card screen now answers setFaceShown for real: it scrolls the face away or back, answers UserMoving while the user drags or the face still glides after a drag, and keeps a request made before the first layout for that layout. A card created with faceShown false opens with the face away. The page is sized to the screen the face leaves it, so its bottom edge stays in view, and is resized only when the face comes to rest. While the face moves the page reaches the bottom of the screen, so no blank strip opens under it. The scroll's content is a screenful plus the face, independent of the page.
…carries its face A page move that a drag cuts short no longer fits the page mid-drag, and the page grows only for an animated move, since a move made at once is fitted straight away. The tests now catch the page being resized on every scroll frame, cover a tap that stops a gliding face, and wait for animated moves by polling for the expected state instead of a fixed delay.
A card in a worker manifest may carry "faceShown": false to open onto its page with the face out of the way. Left out or null, the card opens with its face, and a value that is not a boolean fails the pocket section's decode, so the product loses its cards and keeps its worker, as Android reads the same manifest. Opening a card now looks the card up in its product's published manifest first, for at most 500 ms; a lookup that fails or runs out of time opens the card with its face shown.
Opening a card now waits on its product's manifest before presenting, and a second tap or deeplink in that window built a second screen, which claimed the product's surface and page from the first. PocketCardHosts now ignores an open while another is under way. The 500 ms bound on that lookup did not hold against the real resolver: a task group waits for its cancelled child, and ProductResolver waits on a shared unstructured task that cancellation does not reach. The lookup and the deadline now race through a continuation that resumes once, so the card opens with its face on time whatever the resolver does. A parser test also pins that one card with a non-boolean faceShown drops the valid cards beside it, as Android does.
…at overlap Every test that shows a card's screen now does so in a window of the app's scene, through one fixture that presents it as the app does and one that closes it. The screen's sizing tests become one, a surface test whose second half could not fail on its own goes, and the card hosts' surface checks join the tests of the products they come with.
One lookup that answers late unless cancelled shows both that the face stays shown and that the lookup is told to stop. It also covers the card a product does not publish, whose lookup fails the same way, so that test and the slow resolver go.
The debug card's face switch is checked where the menu saves it, and a page execution's kind in one comparison over both pages.
Drop screen tests that pinned internal mechanics of page fitting and repeated requests, and the bridge test that passed without the override. Merge the two "published face ignored once moved" tests into one parameterised test, and the five surface tests into one test that walks a card from never shown, through presenting, a never-shown rival screen and a full-screen cover, to closing.
A bad address in a debug-only field shows up as the card's error screen, which is enough. Fold the card id and product casing lookups into the widget URL composition test, and drop the menu save tests.
…ing up a copy Tapping a Pocket card presented a full-screen cover that slid up with its own copy of the card, so two cards were on screen. The card's screen now animates its own presentation: its card moves from the card's place in the Pocket to the top, and back on close, while the rest of the screen fades. The Pocket hides its copy while the card is open. Same timing and curve as Android (500 ms, cubic-bezier 0.34, 1.2, 0.64, 1). A card the Pocket cannot place (opened from a link, removed, or the Wallet tab not showing) and Reduce Motion keep the plain cover. Fixes paritytech/platform-bugs#96
…os' into fix/pocket-card-open-transition-ios # Conflicts: # hosts/ios/polkadot-app/Modules/Wallet/WalletMain/WalletMainProtocols.swift
Contributor
|
This pull request touches an app, which is not built by default. Add a label for each build you want:
Each starts as soon as it is added and follows the branch from then on. |
Contributor
Bundle size reportCompared with
WebAssembly modules
Changed files (3)
Commit: 504f691 |
Contributor
|
CI Status: 24 required jobs green, 15 passed and 9 skipped by path filter. All job results
Signing credentials: failure as of 2026-10-15, a release may fail Commit |
The screen now hides its card in the Pocket when it is presented and shows it again when it is dismissed, so opening and closing agree even when only one of them flies. The flight is handed the slot it was decided on instead of looking it up again, and every path through it ends the flight. Two flight tests are merged into one, and the one that pinned the old hiding rule is gone.
A product that opens a chat closes its card and switches tabs at once, so the slot looked up when the close was asked for no longer belonged to the tab the close returns to. The flight now looks the slot up when it starts and fades the whole screen when there is none, and the Wallet answers by the tab container's selection, which changes before the old tab is taken off. A close also reports the landing fade in its duration. The published-face test now covers both an open that flies and one that does not, in place of a separate flight test.
valentinfernandez1
marked this pull request as ready for review
October 15, 2026 12:02
valentinfernandez1
added this pull request to stack #1441
October 15, 2026 12:22
Contributor
|
UI/UX behavior note: user should be able to pull card down to dismiss the details and return back to Pocket. What I would like to see sine we are changin/adding a new transition:
|
alexander-lisovyk
approved these changes
Oct 15, 2026
…card-face-ios # Conflicts: # hosts/ios/polkadot-appTests/TrUAPI/RustRuntimeBridgeTests.swift
…os' into fix/pocket-card-open-transition-ios
pgherveou
approved these changes
Oct 15, 2026
pgherveou
approved these changes
Oct 15, 2026
The typed address is parsed once when the card is saved, so the card holds a URL rather than a string parsed later. An empty field still means no page, since an empty string parses to none.
…d-open-transition-ios
…transition-ios # Conflicts: # hosts/ios/polkadot-app/Modules/Products/Pocket/PocketCardOpening.swift # hosts/ios/polkadot-app/Modules/Products/Pocket/PocketCardScreenViewController.swift # hosts/ios/polkadot-appTests/Products/PocketCardScreenFixtures.swift # hosts/ios/polkadot-appTests/Products/PocketCardScreenTests.swift
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes paritytech/platform-bugs#96.
What
Tapping a card in the Pocket moves that card to the top of the screen, and the product fades in below it. Closing moves the card back to its place in the Pocket. There is one card on screen the whole time, as on Android.
faceShown: falselands with its face shown, then folds it away, as on Android.Screen.Recording.2026-10-15.at.9.32.42.AM.mov
How
PocketCardFlight). The card moves while the rest of the screen fades, with Android's timing: 500 ms, the same overshoot curve.PocketCardOrigin).ModuleNavigating.presentFullScreentakes the transitioning delegate.Tests
PocketCardFlightTestschecks that the Pocket's copy is hidden while the card is open and comes back after any close, and that the screen and the reused product end up as they do without the animation.PocketCardScreenTestsnow covers an open with and without the animation.