Comments (4)
Hello @bradleysmaskell
This is a very interesting feature request. Implementing this is indeed harder than we'd like and it would be in our interest to create something to make it easier. Having said this, I think there might be an easier way to achieve this result.
Have you tried the following?
- Create a native modal view in Android and iOS that loads a server driven view with a given URL;
- Create a custom action that receives the URL as parameter and opens up the modal;
- Use a global context to store the data that must be shared between the screen with the ListView and the modal screen.
By using the Global Context, when you update it from the modal, it should automatically update the other view.
A native support in Beagle
To implement a native support for this in Beagle, we need:
- A modal view in the navigator and actions to open and close it;
- A way for updating the state (context) of the screen from the modal.
We're developing a "version of Beagle" for SwiftUI and Compose called "Nimbus". We do have this feature there. Can you take a look at the implementation in Nimbus and tell us if it would work for you? If it does work for you, we can consider bringing it to Beagle.
Link to this feature in nimbus: https://github.com/ZupIT/nimbus-docs/blob/main/specification/default-actions/navigation.md#more-on-states-and-events
The example above navigates to a new screen. But, in Nimbus, we have the action "present", that works the same way, but opens a modal view instead.
Summary
- I think there's a simpler way to implement this in Beagle without any update to the library. It consists on using the global context to share a state between the screens and custom actions to open a modal. Can you check if this works for you?
- In the long term, I propose a native implementation that works just like Nimbus. What do you think about this?
from beagle.
Hi, I'm passing here just to let you know that the Beagle team is taking some vacation time.
We'll take 2 weeks off and be back at Feb 06. Feel free to keep commenting in this issue and we'll address it as soon as we're back.
from beagle.
Thanks @Tiagoperes. We will try this approach and report back.
from beagle.
Closing this due to inactivity.
from beagle.
Related Issues (20)
- "PositionType": "Absolute" doesn't work HOT 2
- JSON key can have special character HOT 2
- make beagle:container fit to content width HOT 1
- iOS: How can i convert ServerDrivenComponent to UIView with style
- feat: iOS: make BeagleScreenViewController -> convenience init(_ component: ServerDrivenComponent..) public HOT 8
- Height of a ServerDrivenComponent in Swift(UI) HOT 19
- ListView with section header HOT 4
- Can't access ListView initializer for iOS SDK HOT 2
- How to tell when other component scroll into view? HOT 13
- How to animate Component? HOT 3
- Reusable custom component in JSON level HOT 3
- Custom component using multiple built-in components doesn't nested HOT 3
- Support for GZIP compression for smaller payload JSON HOT 5
- Testing auto-reply
- Creating listview programmatically will result in crash with "java.lang.IllegalArgumentException: RecyclerView Id can't be -1" HOT 7
- ListView and GridView padding doesn't work in Android platform HOT 1
- Context data not getting passed HOT 3
- BeagleScreenViewController Lifecycle Analytics HOT 4
- Broken link in CONTRIBUTING.md documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beagle.