Giter VIP home page Giter VIP logo

sextant's Introduction

Build Code Coverage #yourfirstpr



What is ReactiveUI?

ReactiveUI is a composable, cross-platform model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming, which is a paradigm that allows you to abstract mutable state away from your user interfaces and express the idea around a feature in one readable place and improve the testability of your application.

πŸ”¨ Get Started πŸ› Install Packages 🎞 Watch Videos πŸŽ“ View Samples 🎀 Discuss ReactiveUI

Book

There has been an excellent book written by our Alumni maintainer Kent Boogart.

NuGet Packages

Install the following packages to start building your own ReactiveUI app. Note: some of the platform-specific packages are required. This means your app won't perform as expected until you install the packages properly. See the Installation docs page for more info.

Platform ReactiveUI Package NuGet
.NET Standard ReactiveUI CoreBadge
ReactiveUI.Fody FodyBadge
Unit Testing ReactiveUI.Testing TestBadge
WPF ReactiveUI.WPF WpfBadge
UWP ReactiveUI.Uwp UwpBadge
WinUI ReactiveUI.WinUI WinUiBadge
MAUI ReactiveUI.Maui MauiBadge
Windows Forms ReactiveUI.WinForms WinBadge
Xamarin.Forms ReactiveUI.XamForms XamBadge
Xamarin.Essentials ReactiveUI CoreBadge
AndroidX (Xamarin) ReactiveUI.AndroidX DroXBadge
Xamarin.Android ReactiveUI.AndroidSupport DroBadge
Xamarin.iOS ReactiveUI CoreBadge
Xamarin.Mac ReactiveUI CoreBadge
Tizen ReactiveUI CoreBadge
Blazor ReactiveUI.Blazor BlazBadge
Platform Uno ReactiveUI.Uno UnoBadge
Platform Uno ReactiveUI.Uno.WinUI UnoWinUiBadge
Avalonia Avalonia.ReactiveUI AvaBadge
Any ReactiveUI.Validation ValBadge

Sponsorship

The core team members, ReactiveUI contributors and contributors in the ecosystem do this open-source work in their free time. If you use ReactiveUI, a serious task, and you'd like us to invest more time on it, please donate. This project increases your income/productivity too. It makes development and applications faster and it reduces the required bandwidth.

Become a sponsor.

This is how we use the donations:

  • Allow the core team to work on ReactiveUI
  • Thank contributors if they invested a large amount of time in contributing
  • Support projects in the ecosystem

Support

If you have a question, please see if any discussions in our GitHub issues or Stack Overflow have already answered it.

If you want to discuss something or just need help, here is our Slack room, where there are always individuals looking to help out!

Please do not open GitHub issues for support requests.

Contribute

ReactiveUI is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use.

If you want to submit pull requests please first open a GitHub issue to discuss. We are first time PR contributors friendly.

See Contribution Guidelines for further information how to contribute changes.

Core Team


Glenn Watson

Melbourne, Australia


Rodney Littles II

Texas, USA


Artyom Gorchakov

Moscow, Russia


Colt Bauman

South Korea


Chris Pulman

United Kingdom

Alumni Core Team

The following have been core team members in the past.


Geoffrey Huntley

Sydney, Australia


Kent Boogaart

Brisbane, Australia


Olly Levett

London, United Kingdom


AnaΓ―s Betts

San Francisco, USA


Brendan Forster

Melbourne, Australia


Claire Novotny

New York, USA

.NET Foundation

ReactiveUI is part of the .NET Foundation. Other projects that are associated with the foundation include the Microsoft .NET Compiler Platform ("Roslyn") as well as the Microsoft ASP.NET family of projects, Microsoft .NET Core & Xamarin Forms.

sextant's People

Contributors

chrispulman avatar dependabot-preview[bot] avatar dependabot[bot] avatar devqasm avatar giusepe avatar glennawatson avatar limefrogyank avatar mihailskuzmins avatar olevett avatar omnipotentowl avatar reallinfo avatar renovate[bot] avatar rlittlesii avatar schnerring avatar winterdouglas avatar worldbeater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sextant's Issues

feature: Navigate to a page then remove previous one from stack

Feature Request
I would like to achieve the following behavior:
Once I navigate to a page, I would like to remove the previous page from the stack. Something like

			this
				.HostScreen
				.Router
				.NavigateAndRemovePrevious
				.Execute(targetViewModel)
				.Subscribe()
				.DisposeWith(Subscriptions);

What is the current behavior?

I tried mimicking this behavior by manually removing the previous entry from the Router's NavigationStack but that resulted in an animated back navigation then forward navigation to my target vm.

feature: add support for UWP navigation

Is your feature request related to a problem? Please describe.
There is no support for UWP native currently.

Describe the solution you'd like
Please add support for the UWP navigation stack.

feature: Add support to Shell

Is your feature request related to a problem? Please describe.

Currently Sextant don't support Xamarin.Forms.Shell and neither does shell support any MVVM Framework.

Describe the solution you'd like

Once a solution is born from this issue: xamarin/Xamarin.Forms#5166
I suggest to discuss this with the Xamarin team to see how we can make our life easier.

Describe alternatives you've considered

Describe suggestions on how to achieve the feature

Additional context

AFAIK they are still working on a specification and that should be share soon, so let's be ready to participate.

performance: Remove activator

Consider removing the activator here

() => Activator.CreateInstance(typeof(TView), mScheduler, bgScheduler, vLocator),

One way to remove it would be to do something like

 public static void RegisterNavigation<TView, TViewModel>(IScheduler mainThreadScheduler = null, IScheduler backgroundScheduler = null, IViewLocator viewLocator = null)
            where TView : new, IPageView, IViewFor
            where TViewModel : class, IPageViewModel
        {
            var bgScheduler = mainThreadScheduler ?? RxApp.TaskpoolScheduler;
            var mScheduler = backgroundScheduler ?? RxApp.MainThreadScheduler;
            var vLocator = viewLocator ?? Locator.Current.GetService<IViewLocator>();
            
            Locator.CurrentMutable.Register(
                () => new TView { Scheduler = mScheduler, BackgroundScheduler = bgScheduler, ViewLocator = vLocator },
                typeof(IViewFor<TViewModel>),
                "NavigationView");
        }

Option to wrap a modal inside a NavigationPage

When I do PushModal from my viewmodel, the modal shows just fine. But as a good citizen I added a "Close" Toolbar button in the top right corner so that the user can opt out of the modal. The button is never shown because the modal doesn't have a NavigationPage.

I've used similiar frameworks before and I think MvvmCross has an option to "WrapInNavigationPage" when pushing modals.

An alternate solution would perhaps be to do this by using interactions, but that might trick the IViewStackService

There should be an option to wrap it in a NavigationPage.

Additional context

Screenshot nr 2 is the modal page without the NavigationBar.

Screenshot 2019-07-12 at 11 32 07
Screenshot 2019-07-12 at 11 32 26

Fix the architecture of the project

It's a mess right now. Plain and simple.
Break into folders, separate classes into responsibilities and think into how I wanna to approach it in the future.
Maybe extract the Xamarin.Forms to another project so other platforms could be used instead?

"Absolute Layout Issue"

Hi, I spotted an issue when I try to implement "AbsoluteLayout" In any page...

My code looks kind of like this:

<rxui:ReactiveContentPage
x:Class="SmartDemo.View.InicioV"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.XamForms"
xmlns:vm="clr-namespace:SmartDemo.ViewModel"
Title="Inicio"
x:TypeArguments="vm:InicioVM">
<ContentPage.Content>

        <!--  Status  -->
        <Button
            x:Name="Btn_status"
            BackgroundColor="{StaticResource GENERICButtonColor}"
            Font="35, Bold"
            HeightRequest="150"
            Image="off.png"
            Text="Desconectado."
            VerticalOptions="StartAndExpand"
            WidthRequest="200" />

    </StackLayout>
</ContentView>

I was trying to add an "Overlay" page to work as a "MasterDetail" or something...

First solution I tried: "Add and do some mods:
1.- At my first stacklayout I added this
"StackLayout AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
AbsoluteLayout.LayoutFlags="All">
[... this stacklayout content]
</StackLayout"

2.- Then I created a "ContentView" right after the end of the previous stacklayotu:
     <!-- Overlay -->
<ContentView x:Name="overlay"
             AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
             AbsoluteLayout.LayoutFlags="All"
             IsVisible="False"
             BackgroundColor="#C0808080"
             Padding="10, 0">
  
  <StackLayout Orientation="Vertical" 
               BackgroundColor="White" 
               HeightRequest="175" 
               WidthRequest="300" 
               HorizontalOptions="Center" 
               VerticalOptions="Start" 
               Margin="0,20,0,0" >

    <Label BackgroundColor="Black" FontSize="18" TextColor="White" HorizontalOptions="Fill" Text="Im an Overlay" />
  </StackLayout>
</ContentView>

I tried to compile and run severaltimes the code and it broke everytime... So I decided to remove piece by piece of the code... until I reached the point where I had to remove the "" then everything went ok... but then the content on my page disappeared and I was able only to summon the "content view" trhoughout (whenever I keep the ContentView, If I delete the content view code everything goes ok)

So It seems that "AbsoluteLayout" gives problems whenever I try to work along with it...

Still maybe I'm doing something wrong with my code... I'll leave the full code here:

<rxui:ReactiveContentPage
x:Class="SmartDemo.View.InicioV"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rxui="clr-namespace:ReactiveUI.XamForms"
xmlns:vm="clr-namespace:SmartDemo.ViewModel"
Title="Inicio"
x:TypeArguments="vm:InicioVM">

<ContentPage.Content>

        <!--  Status  -->
        <Button
            x:Name="Btn_status"
            BackgroundColor="{StaticResource GENERICButtonColor}"
            Font="35, Bold"
            HeightRequest="150"
            Image="off.png"
            Text="Desconectado."
            VerticalOptions="StartAndExpand"
            WidthRequest="200" />
       </StackLayout>

    <!--  OVERLAY  -->
    <ContentView
        x:Name="Beta"
        BackgroundColor="Red"
        IsVisible="False">
        <StackLayout Margin="0,0,50,0" BackgroundColor="Wheat">
            <Label
                BackgroundColor="Black"
                FontSize="18"
                Text="CAPITAL CITIES"
                TextColor="White" />
            <StackLayout HorizontalOptions="Center">
                <Button x:Name="Close_btn" FontSize="Large" />
            </StackLayout>
        </StackLayout>
    </ContentView>
</ContentPage.Content>

[BUG] Type resolver error when running Sextant 1.6 with Xamarin.Forms

Describe the bug

After creating a new project with Xamarin.Forms and Sextant 1.6 I get this error
Could not resolve type with token 01000005 from typeref (expected class 'Sextant.SextantHelper' in assembly 'Sextant, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null')

If I downgrade to 1.5.5 everything works.

Steps To Reproduce

@RLittlesII already created a sample that shows the issue: https://github.com/RLittlesII/Sextant.Sample

Expected behavior

No errors :)

Screenshots

Environment

  • OS:
  • Version
  • Device:

Additional context

[BUG] Cake build is not building on a local Mac environment anymore

Describe the bug

When running ./build.sh on a local Mac I get the error

/[redacted]/ReactiveUI/sextant/tools/ReactiveUI.Cake.Recipe.1.0.88/parameters.cake(147,45): error CS1061: 'ITFBuildProvider' does not contain a definition for 'IsRunningOnAzurePipelinesHosted' and no accessible extension method 'IsRunningOnAzurePipelinesHosted' accepting a first argument of type 'ITFBuildProvider' could be found (are you missing a using directive or an assembly reference?)
/[redacted]/sextant/tools/ReactiveUI.Cake.Recipe.1.0.88/parameters.cake(147,100): error CS1061: 'ITFBuildProvider' does not contain a definition for 'IsRunningOnAzurePipelines' and no accessible extension method 'IsRunningOnAzurePipelines' accepting a first argument of type 'ITFBuildProvider' could be found (are you missing a using directive or an assembly reference?)

Steps To Reproduce

  1. git clone Sextant
  2. navigate to the recent cloned project
  3. run ./build.sh

Expected behavior

A successful build.

Screenshots

Environment

  • OS:
  • Version
  • Device:

Additional context

feature: Create Sextant.XamForms Package

Is your feature request related to a problem? Please describe.

Currently there is a need to depend on Xamarin.Forms in order to use Sextant.

Describe the solution you'd like

I think moving forward we will need to move the Xamarin.Forms implementation into a Sextant.XamForms library. This will allow us to target other platforms easier with the root namespace Sextant, similar to what we do with ReactiveUI.Events packages.

Sextant >= 1.7.4 throws Exception on PushModal

Updating above Sextant 1.7.3 throws an exception if page is pushed modal on android and ios (Tested by debugging on Simulator/Emulator)

The Exception is: "Page must not already have a parent..."

See small testproject updated with myget sextant:
bochos-bln/TabbedPageSextantSample@cf9f5aa

Steps To Reproduce
Start the App, press "First Modal Button"

Expected behavior
Modal Page Pushed (like with Sextant 1.7.3
... but App Crashes

Environment

  • OS:
  • Version
  • Device:

Additional context

Updated to System.Reactive 4.0.0

Updating Sextant dependencies to the following versions. This gets us to System.Reactive 4.x which has performance improvements.

  • Xamarin.Forms 3.0.0.561731
  • ReactiveUI 8.5.1
  • Genesis.Logging 3.0.0

ViewModel constructor is been called twice

When you have a NavigationViewModel + ViewModel and call a PushModal, Sextant is instantiating the VM twice.
That's because the way the NavigationView(Model) and regular View(Model)s are registered in the factory.

Add project package information

Add nuspec attributes to csproj for nuget metadata

  • Authors
  • Package License Url
  • Package Project Url
  • Repository Url
  • Package Icon Url
  • Package Tags

New logo Sextant

Hello, I designed a logo for Sextant. I combined a navigasyon and sextant icon. I designed a logo in 2 different styles. If you like any of these, I will send you a pr.

sextant

e.g. In the readme file it will look like this;

1

feature: investigate uno support

Investigate if uno requires anything beyond the basic UWP and adding support for it. This will have a dependency on UWP support.

[BUG] In Xamarin Forms the iOS dll is loaded instead of the .netstandard (version 1.6.1)

Describe the bug

package 1.5.5 works as expected in iOS

package 1.6.1 with Linker behavior (Link Framework SDK's only)
Fails to build
MTOUCH : error MT2101: Can't resolve the reference 'Sextant.NavigationView Sextant.SextantHelper::Initialize(System.Reactive.Concurrency.IScheduler,System.Reactive.Concurrency.IScheduler,ReactiveUI.IViewLocator)', referenced from the method 'System.Void XXX.App::.ctor()' in 'Sextant, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null'.

package 1.6.1 with Linker behavior (Don't Link)
Crashes on Startup with System.TypeLoadException has been thrown Sextant.SextantHelper

The iOS dll is getting loaded instead of the .netstandard also if configured:

  <ItemGroup>
    <Reference Include="Sextant">
      <HintPath>$(NugetPackagesPath)\sextant\1.6.1\lib\netstandard2.0\Sextant.dll</HintPath>
    </Reference>
  </ItemGroup>

Environment

  • OS: iOS
  • Version: 12.2
  • Device: Any device, or simulator

Routing API revamp RFC

I just started experimenting with routing (UWP app), so while I have fresh eyes, some thoughts:

Rename RoutingState to Router

"Routing state" implies a container of state data rather than a class responsible for navigation actions. "Router" seems a better name for a class that actually handles routing. This is further reinforced by the fact that even on the IScreen interface, the RoutingState property name is "Router". IMO, Router is both more apt and concise.

Formalize navigation stack into a class

Today, we have a handful of commands hanging off RoutingState along with a ObservableCollection called "NavigationStack" (note that here it's not even a stack in the data structures sense of the term). It would be better to introduce a new class, NavigationStack with the following signature:

public class NavigationStack
{
  ReactiveCommand<Unit> Advance { get; }
  ReactiveCommand<Unit> Backtrack { get; }
  IRoutableViewModel Current { get; }
}

This would leave no ambiguity about what the commands do. If there is value in it, the class can implement ObservableCollection to enable subscribing to notifications. Router would then have a read-only property named NavigationStack.

Replace the Navigate command with method + property

Is there value in Navigate being a command? Writing router.Navigate.Execute(vm) feels clunky. Would be better to have Navigate be a method, and have a companion Navigating observable property on Router. Another benefit is that the method can have an (optional) bool reset attribute, thus letting us drop the NavigateAndReset command on Router.

Push Page weird behavior

Hi, I already ran the original code and I happen to have a very weird issue.

Whenever I reach the "Second Modal" and press the "Push Page" button nothing happnes. However, when I do "pop modals" I happen to come across with the pages that I actually "Pushed" on the Second Modal... which can be described like this:

At frist:
Home Page -> First Modal -> Second modal (PUSH)

After push:
Home Page -> Pushed Page from second modal -> First Modal -> Second Modal

After poping pushed page:
Home Page -> First Modal -> Second Modal

I dont know if I made my self clear, any ways, I'm tyring to figure out what is going on but I happen to hae the exact same issue when working along with my own solution...

Thank you!

feature: Add an ILogger to log information

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.

Currently to use Sextant you have to take a dependency on Genesis.Logging. We need a way to log Sextant internal information, without depending on a third party framework.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I would like Sextant to provide and ILogger and a default implementation. Then any consumer can implement Sextant's ILogger and log Sextant output to a third party framework of their choosing.

feature: Add NavigateForResult

I want to have a reusable viewmodel that can emit results back to the calling viewmodel.

If we can get something like a NavigateForResult with a generic type then that would be neat. Interactions are great but I believe they are best for very simple dialogs and simple results. What about a complex object? What if it's prompted as a popup, but as a full page? Yes we can subscribe to events from the ViewModel before passing it through to Navigate.Execute() but that just returns a IRoutableViewModel object and will make the pipeline less neat :D

ChooseContacts = ReactiveCommand.CreateFromObservable(() =>
    HostScreen.Router.NavigateForResult.Execute(new ContactsResultViewModel())
        .Select(contacts => /* transform result */));

We can do it by making a generic IRoutableViewModel<TResult> so the routing commands can listen to it's result.

viewmodel based navigation as first class citzen for all platforms

Our routing is something that should be overhauled in the future. It is far too prescriptive and platform-specific. ReactiveUI should really provide a general routing mechanism that cares not about how you manifest it in the view. All that logic should be written ​_once_​ (instead of per platform like we have now) and shared with simple shims to integrate at the UI level.

This is a great opportunity to look around and see how others are doing it. @rid00z has mentioned over beers he has suggestions from implementing this type of logic as part of his framework FreshMvvm.

Additionally MvvmCross has the notion of handling this behavior via Presenters

@jcmm33's team has done a significant amount of work on-top of ReactiveUI and have implemented their own presenter solution. Maybe this is a chance to use this implementation as the golden standard and off-load the burden from his team of having to maintain their own.

Suggested leads for this topic are @jcmm33, @rid00z, @codemillmatt and of course @kentcb / @flagbug

proposal: Add support for platform animation

Is your feature request related to a problem? Please describe.

Currently all we have is the ability to tell Sextant to animate or not.

Describe the solution you'd like

I have seen a few custom animation libraries for Xamarin.Forms. What I would like is from Sextant is the ability to abstract platform level animations and allow better support for animations. Change the API from taking a bool to maybe an enumeration where the consumer can dictate which platform animation to use. What would be great is the ability to provide your own animations that have platform specific implementations.

Describe suggestions on how to achieve the feature

The following are extensions that should get us where we want to be in some fashion.

Documentation

GitHub Projects

feature: Add a RgPopup plugin for Sextant.XamForms

Is your feature request related to a problem? Please describe.

Sextant is a navigation library built for Xamarin.Forms. A few Xamarin.Forms projects I have used have had RgPopup implemented for use. Currently there is a separate navigation structure for the pop up pages.

Describe the solution you'd like

I would like to create a Sextant.RgPopup package that explicitly brings https://github.com/rotorgames/Rg.Plugins.Popup into Sextant and handles some of the boilerplate code to get it up and running.

Describe alternatives you've considered

The alternative I have is re implement this same package under my own name and use it. I have already done this for a few projects and would like a centralized standard place to keep this up to date.

Describe suggestions on how to achieve the feature

Wrap the provided IPopupNavigation in all the Sextant goodness.

Additional context
Other MVVM Frameworks that support XF have a plugin for this package for XF.

Prism RgPopup Plugin

Improve CI pipeline

  • Publish alpha versions of the package based on develop
  • Publish beta versions of the package based on develop
  • Publish final versions of the package based on tags and close the release/milestone

[BUG] PopToRoot doesn't clear the PageStack

Describe the bug

PopToRoot doesn't clear the navigation stack. It only clears the View.

Expected behavior

When PopToRoot is called the ViewStackService.PageStack should clear

feature: Add support for Xamarin.iOS

Is your feature request related to a problem? Please describe.

I can only use Sextant for Xamarin.Forms

Describe the solution you'd like

I want to use Sextant for Xamarin.iOS

Describe alternatives you've considered

None.

Describe suggestions on how to achieve the feature

Implement iView using a UINavigationController for iOS

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.