Code Monkey home page Code Monkey logo

unityfx.mvc's People

Contributors

abogarsukov avatar arvtesh avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

alan-baylis

unityfx.mvc's Issues

Compile error on Unity 2019.3+

  • Create new project using Unity 2019.3;
  • Add UnityFx.Mvc package.

Expected result: there is no error or warning related to the package.
Actual result: compile error.

Add `IViewControllerInfo`

The IViewControllerInfo is supposed to contain data shared between IPresentResult and IPresentContext and the controller present arguments. It should be usable before the controller has been instantiated (i.e. before present operation has been completed).

  • Add the IViewControllerInfo interface and its implementation(s).
  • Modify IPresentResult and IPresentContext.
  • Write documentation.
  • Update README.

Make commands non-generic

ICommandTarget.InvokeCommand() should not be generic for AOT compiler. We need to support 3 command types: int, string, enum. All of these can be packed into a pointer-sized non-generic structure. Also majority (like 99%) of the use-cases only need 0 or 1 argument. Thus, the 2 new structs should be designed: Command and Variant. ICommandTarget should look like this:
bool InvokeCommand(Command cmd, Variant args);.

Add MessageBoxController

Add MessageBoxController, MessageBoxView and MessageBoxArgs as implementation of a generic message box component. MessageBoxView should use UGUI and should allow replacing with any class that implements IView and IConfigurable<MessageBoxArgs>.

Assembly: UnityFx.Mvc.Extensions
Namepsace: UnityFx.Mvc.Extensions

  • Implement the controller and view.
  • Write documentation and code samples.
  • Write unit tests.
  • Use the controller in the sample app.
  • Update README.

Add support for controller tags

A controller can have an integer tag value associated with it. The value is assigned via ViewControllerAttribute and can be accessed through IViewControllerInfo interface.

  • Add the tag to IViewControllerInfo and ViewControllerAttribute.
  • Add the documentation.
  • Add unit tests.

Verbose 'invalid view type' error

Currently in cases when invalid view component is attached to prefab, error is not raised when presenting the controller. Instead, an InvalidCastException is thrown on the first attempt to access the view. Need to throw corresponding error from Present.

Add support for singleton controllers

No more than one instance of a singleton controller can exist at any time. A controller can be marked as singleton via setting PresentOptions.Singleton flag. If an instance of a singleton controller is already presented when a new one is about to be created, the former should be dismissed.

  • Add the PresentOptions.Singleton flag.
  • Implement presenting of singleton controllers.
  • Add documentation.
  • Write unit tests.
  • Update README.

Present error handling

Any exceptions thrown as a result of IPresenter.Present call, should cancel the present operation, dispose the controller and put the exception info into the present Task.

  • Implement the exception handling.
  • Implement hooks for custom error handling.
  • Write unit tests.

Add middleware support

Add ASP.NET-like middleware support. Middleware is a delegate with a signature:

public delegate Task PresentDelegate(IPresentService presenter, IViewControllerInfo controllerInfo);

Middleware is added via PresenterBuilder and should be invoked before controller creation in the same order as they were registered.

ASP.NET middleware reference.

  • Add the PresentDelegate.
  • Add new methods to PresenterBuilder class.
  • Change Presenter implementation.
  • Write documentation.
  • Add unit-tests.
  • Update README.

Dialog template

App dialogs should share visual style, which includes:

  • header (titlebar, close button);
  • footer (OK/Cancel buttons);
  • content (background color).

We need to add tooling for easy creation of dialogs:

  • DialogController;
  • 'DialogView';
  • 'DialogArgs'.

Add MVC bindings configurator

Bindings management appears to be quite messy if done manually. Need to add helper scriptable object with custom editor script for this. It should automate the following:

  • Update the prefab list;
  • Bind specific controller to the prefab;
  • Validate the bindings list;
  • Auto-reset the list from specific folders;
  • Add new controller/view/prefab (codegen).

Add LoadingController

Add LoadingController, LoadingView and LoadingArgs as implementation of a loading progress component. LoadingView should use UGUI and should be allow replacing.

Assembly: UnityFx.Mvc.Extensions
Namepsace: UnityFx.Mvc.Extensions

  • Implement the controller and view.
  • Write the documentation with code samples.
  • Write unit tests.
  • Use the controller in sample app.
  • Update README.

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.