Giter VIP home page Giter VIP logo

Comments (4)

Tiagoperes avatar Tiagoperes commented on September 17, 2024

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?

  1. Create a native modal view in Android and iOS that loads a server driven view with a given URL;
  2. Create a custom action that receives the URL as parameter and opens up the modal;
  3. 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

  1. 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?
  2. In the long term, I propose a native implementation that works just like Nimbus. What do you think about this?

from beagle.

Tiagoperes avatar Tiagoperes commented on September 17, 2024

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.

bradleysmaskell avatar bradleysmaskell commented on September 17, 2024

Thanks @Tiagoperes. We will try this approach and report back.

from beagle.

Tiagoperes avatar Tiagoperes commented on September 17, 2024

Closing this due to inactivity.

from beagle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.