Skip to content

Spike: Investigate best approach for implementing DesignViewModels  #1988

Open
@Al12rs

Description

@Al12rs

Problem statement:

DesignViewModels are used to preview our Views and Controls directly inside the IDE, without having to rebuild and relaunch the entire App. Having these is pretty critical for UI and Styling implementation efficiency.

A lot of of our previous DesignViewModels were removed during the Loadout Items rework, and many views are now missing one.

Our previous approaches for implementing these had a number of issues. Standout among them the fact that many of these DesignVMs had logic in them to generate fake items etc, which required maintenance as underlaying data changed or as the original ViewModel changed, posing a larger than desirable upkeep burden (enough so that they ended up getting removed).

Another issue is that DesignViewModels need to have a default constructor with no arguments, which prevents us from being able to use dependency injection to satisfy dependencies that the main ViewModel might have. This means that the approach of subclassing the main ViewModel to implement the design one would often be blocked on this.
The absence of DI also prevents us from being able to easily inject mocs or test data.

Spike:

Investigate best approach to use going forward.

Identify objectives:

Objectives:

Proposed solution:

Metadata

Metadata

Assignees

No one assigned

    Labels

    SpikeAn investigation task

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions