Page MenuHomePhabricator

Make FeatureManager more robust to process multiple requirements for a feature
Closed, ResolvedPublic5 Estimated Story Points

Description

While working on T300612 we discovered hidden technical complexity and an opportunity to refactor the feature management code. This task is needed to unblock work there.

Background

See T300612#7927452

Description

Allow FeatureManager to process more complex requirements to determine if a feature should be enabled.

Developer notes

  • Create a builder class as a mechanism for taking a list of requirements and generating the corresponding requirement for the FeatureManager to evaluate.
  • Refactor the original Vector hooks method and incorporate its functionality in the new requirements list.
  • Remove/rename shouldDisableMaxWidth() to be used for both its former eponymous feature and for the sticky header feature.
  • Update the original Vector hooks method to use Title:Value instances instead to be able to test method more easily in isolation.

Acceptance criteria

  • Both DisableMaxWidth and sticky header feature should work with the newly refactored FeatureManager
  • All features continue to work with the newly refactored FeatureManager
  • Tests are added/updated for FeatureManager and new builder class

Event Timeline

Jdlrobson subscribed.

I think this one might be done. Will check.

Checked in with the team and there seems agreement that this is done.