@procore/labs-filters
Convenient wrappers for @particles/filters component
$ cnpm install @procore/labs-filters 
SYNC missed versions from official npm registry.

Filters

<procore-status beta />

Convenient wrappers for @particles/filters components

Installation

yarn add @procore/labs-filters

Dependencies

@procore/core-react and react are listed as external peer dependencies. The package will not bundle the code, and requires the app client to provide it as a dependency. The external peer dep is to assure React Context is consistent in a client's React tree, the child consumers can reference the correct parent provider. If the package uses latest features or bug fixes and a new minimum version of core-react is required, it should be considered a breaking change as the peer dependency version must be met.

Motivation

While integrating @particles/filters in Procore, it was found to have several design and implementation issues that needed to be addressed, which resulted in code duplication within the micro-frontend architecture.

labs-filters main goal is to eliminate code duplication within the app, but it also addresses other issues of @particles/filters, such as:

  • @particles/filters implicitly provides controlled and uncontrolled ways of using it, which violates interface segregation principle
  • onChange method is only provided with an unordered list of selected filters, making persistance of selected filters a problem
  • onChange is overloaded with unnecessary concerns, such as handling "filter unfocused" events
  • Filters are not displayed in the correct order when used via controlled API

Current Tags

  • 3.0.0                                ...           latest (6 days ago)

11 Versions

  • 3.0.0                                ...           6 days ago
  • 2.2.0                                ...           3 months ago
  • 2.1.2                                ...           4 months ago
  • 2.1.1                                ...           5 months ago
  • 2.1.0                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 1.0.0-beta.2                                ...           7 months ago
  • 1.0.0-beta.1                                ...           a year ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |