Code Monkey home page Code Monkey logo

Comments (10)

glennawatson avatar glennawatson commented on June 11, 2024 1

Cool thanks @bouteminequalid I'm sure Rodney will take it into consideration

from rfcs.

anaisbetts avatar anaisbetts commented on June 11, 2024

A few thoughts on this:

  1. It seems like ModalStack and PageStack act more like Behaviors (i.e. properties that always have a current value), so it would probably be way more ergonomic if IRoutingStack was a ReactiveObject that you can WhenAny on. This simplifies TopModal and TopPage too because it can just be an OAPH

  2. A lot of these fancy list types just get in the way, a regular IEnumerable is probably fine here (or IReadOnlyList maybe). tbh I'd probably just use a regular List.

  3. While Xamarin lets you have a stack of modal dialogs, is that really a Good Idea from a UX perspective? I would argue that you should have exactly One modal dialog slot active at any time, and that calling PushModal when a Modal is already active should just replace the previous one completely.

Do we allow consumers to implement their own IRoutingStack and register it for use with ReactiveUI?

I'd argue RoutingStack is more like List or String - it's really just a Bag of Data, so people shouldn't need to write a custom implementation (just like we don't have IString). People will ask for it, and you should Tell Them No :) Instead, make RoutingStack so easy to construct (i.e. with a constructor that optionally lets you fill in the stack explicitly for test time) and hackable that people won't need to.

from rfcs.

RLittlesII avatar RLittlesII commented on June 11, 2024

@paulcbetts The moments where words matter. IRoutingStack should have been IRoutingStackService or IRouter.

I agree that the collection of data can be as basic as possible.

  1. ... I would argue that you should have exactly one modal dialog slot active at any time, and that calling PushModal when a Modal is already active should just replace the previous one completely.

I agree with there should only ever be a single modal present at a time. I am not sure that ReactiveUI should impose a limit in it's implementation that doesn't exist on the target platform.

from rfcs.

glennawatson avatar glennawatson commented on June 11, 2024

I would seperate the concepts of modal and navigation into two instances of the same interface. That way it's easier for the user to add new stacks to support y platform.

from rfcs.

glennawatson avatar glennawatson commented on June 11, 2024

Also reduces the number of methods in your interfaces eg navigation.Modal.Pop(true)

from rfcs.

glennawatson avatar glennawatson commented on June 11, 2024
  • As discussed offline it would be useful if we can separate out the concept of "animate" to it's own interface.
  • Support for Push and remove as per https://github.com/reactiveui/ReactiveUI/issues/1856
  • Why IObservable over ReactiveCommand's? ReactiveCommand's have re-entrance protection.

from rfcs.

BoutemineOualid avatar BoutemineOualid commented on June 11, 2024

Hello everyone,

I think these features are worth adding to the framework:

  • Navigate back with X hops.
  • Navigation back to a target vm already in the stack.
  • Navigation forward to a vm and removing x previous pages from the stack.

from rfcs.

RLittlesII avatar RLittlesII commented on June 11, 2024

@BoutemineOualid All of these I believe are already captured on the Sextant Repository . If not feel free to make sure they are captured.

from rfcs.

mediabuff avatar mediabuff commented on June 11, 2024
  1. The API seems to lack 'forward view' stack. Platforms like WPF - frame based navigation support these
  2. Additionally, these platforms persist the 'view' state/visual tree - on their corresponding stacks. Thus the there are two stack model - one based on identity and other based on content. Which would the 'view model' navigation support ? is the view model re-created or cached ?
  3. Don't think there should be separate stack for modal and non-modal. The modal entries should stack on non-modal.
  4. what about memory cleanup - either of the views or view models in all scenarios

I have a working WPF version, based on WPF-Frame.

from rfcs.

RLittlesII avatar RLittlesII commented on June 11, 2024

@mediabuff

  1. I am not sure I understand. I've not worked much with WPF
  2. My thought would be the content. The ViewModel should be persisted as the binding context? I wouldn't want to recreate that state everytime you Pop from the stack.
  3. This initial API was based on Xamarin's INavigation interface. I think WPF doesn't care, and @glennawatson has pointed out that WPF would prefer these concerns separated out because it doesn't make sense.
  4. Currently there is support for Destroying ViewModels in Sextant. I have been asked to open support for Views as well. I think providing an extension point for clean up is extremely important.

from rfcs.

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.