Skip to content

Feature's should auto-disable if their dependencies are disabled. #21

@ahammer

Description

@ahammer

in DartBoardFeature there is an "enabled" flag, that allows a feature to turn off. E.g. Firebase only works across Android/iOS/MacOS/Web. So I wouldn't want to enable the feature on unsupported platforms.

Currently the solution would be to set "enabled" to a platform check like

  @override
  bool get enabled => kIsWeb || Platform.isAndroid || Platform.isIOS;

You can also disable features manually by calling setFeatureImplementation(featureName, null)

As a framework user, I'd like for a disabled feature to automatically propagate across the feature tree.

E.g. at Feature Linking, prune the tree of implicitly disabled features, whether that be a feature that is explicitly disabled (e.g. with setFeatureImplementation to null, or it's implicitly disabled because of a call to enabled.

Acceptance:

  • Be able to disable a high level feature (e.g. redux), observe dependent features being removed (e.g. Minesweeper).
  • Be able to disable features via enabled check, e.g. platform check. And propagate that to dependent features. E.g. FirebaseAuth, FirebaseDatabase should disable on Windows/Linux, and features that use them shouldn't be presented (e.g. Chat).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions