Title: Revise frame access API in the context of {N} 4.0 · Issue #5407 · NativeScript/NativeScript · GitHub
Open Graph Title: Revise frame access API in the context of {N} 4.0 · Issue #5407 · NativeScript/NativeScript
X Title: Revise frame access API in the context of {N} 4.0 · Issue #5407 · NativeScript/NativeScript
Description: Which platform(s) does your issue occur on? Both Please provide the following version numbers that your issue occurs with: Cross-platform modules: 4.0.0 frame.topmost() API is the most obvious "static" API to access navigation frame that...
Open Graph Description: Which platform(s) does your issue occur on? Both Please provide the following version numbers that your issue occurs with: Cross-platform modules: 4.0.0 frame.topmost() API is the most obvious "sta...
X Description: Which platform(s) does your issue occur on? Both Please provide the following version numbers that your issue occurs with: Cross-platform modules: 4.0.0 frame.topmost() API is the most obvious &quo...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/5407
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Revise frame access API in the context of {N} 4.0","articleBody":"### Which platform(s) does your issue occur on?\r\nBoth\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n- Cross-platform modules: 4.0.0\r\n\r\nframe.topmost() API is the most obvious \"static\" API to access navigation frame that is very popular among customers. The fact that it just works (until now) is related to {N} apps mostly having a single internally created frame up to {N} 4.0. With {N} 4.0 we expose the ability to the developer to create multiple frames in different scenarios and there are scenarios where frame.topmost() is not really applicable. Generally frame.topmost() returns the last frame that performed navigation but that is not entirely obvious either from its name, or from the documentation -- with {N} 4.0 the following scenario will be possible that renders frame.topmost() meaningless:\r\n\r\n- Root tabview with two tab items\r\n- Each tab item contains frame as a root element (with defaultPage property set to module name)\r\n\r\nWhen you load the app:\r\n- First tab item is processed thus its frame is processed and navigation occurs to the page set as frame.defaultPage (implicitly this adds frame1 to the top of the frame stack)\r\n- Second tab item is processed (nevertheless it is not visible) thus its frame is processed and its navigation entry is added to the navigation queue (but at the same time this implicitly adds frame2 to the top of the frame stack)\r\n\r\nSo if while playing with the visible first tab, you try to reference its frame via frame.topmost() you will actually get a reference to the invisible frame from the second tab.\r\n\r\nConsider:\r\n- Updating frame.topmost() documentation to explain that it returns the frame that performed navigation last\r\n- Extend frame access API besides frame.topmost() to support scenarios like the one above (possible use frame.id and provide API for the user to lookup frames by id)\r\n- Do we need the frame stack at all? Is it a stack or something else?\r\n","author":{"url":"https://github.com/manoldonev","@type":"Person","name":"manoldonev"},"datePublished":"2018-02-09T15:44:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/5407/NativeScript/issues/5407"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:89483b46-2deb-f1c3-f2a7-c92ae84e7e7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D20E:D9D56:1C1451A:2782534:6A5FB8EF |
| html-safe-nonce | 52e21e6df8b4b50d90c6a133619173dfa254d3d151ef8fbe97b468f0fb1b3bae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjBFOkQ5RDU2OjFDMTQ1MUE6Mjc4MjUzNDo2QTVGQjhFRiIsInZpc2l0b3JfaWQiOiI3MTc0NjQ2MTIwMjAxNDAyNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 982bff764e4968a2616f30d2ea8a764d7d1e99c0113f593abe75c730065bbd06 |
| hovercard-subject-tag | issue:295913989 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/5407/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0210503ae91c4a5723f3ed67d7db1ccab7137af9f44fa739f7c9a3ba66513601/NativeScript/NativeScript/issues/5407 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0210503ae91c4a5723f3ed67d7db1ccab7137af9f44fa739f7c9a3ba66513601/NativeScript/NativeScript/issues/5407 |
| og:image:alt | Which platform(s) does your issue occur on? Both Please provide the following version numbers that your issue occurs with: Cross-platform modules: 4.0.0 frame.topmost() API is the most obvious "sta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | manoldonev |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0cfc367faf9c4c774d2a903897aa214c786247c4f45ffcee48cda2b819fb0c8 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 94569c859bc88d6bf7de7e0ce3f2a11cd529a131 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width