[WIP] Add the ability to filter deprecations by range #191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this does
This PR adds a new
/filters
route, which exposes all of the deprecations as a filterable list.Currently, you can only filter by version range (meaning that ember, ember-cli, and ember data are all lumped in together).
New dependencies
This PR adds several new dependencies:
qunit-dom
&ember-test-selectors
(both for acceptance testing)semver
for comparing version range. This PR currently usessemver-compare
, but its API is much more limited, and for the sake of filtering ranges in query params,semver
's more diverse API proved to be very usefulemberx-select
for the filter dropdownsMajor changes
/filters
. I am 100% not attached to this name at all, just had to start somewhere 😛contentFolders
list out of thecontent-docs-generator
addon and into a standalone module so that it can be imported elsewhere.contentFolders
list onconfig
object so that it can be used to grab all of the deprecation messages in thefilters
route.Things worth noting
The current deprecation pages use
path
andversion
query params to request JSON from thecontent
path. This works fine in those cases because each route in the deprecations app renders static chunks of deprecations (e.g. all the deprecations in ember data 2.x).However, to filter across all sorts of ranges, I didn't see a way to do that via params sent in an ember data query, so instead I just load all of the deprecation warnings in the
/filters
route and then do the filtering via a set of computed properties in the controller.WIP status
This is 100% just a first-pass on the functionality that @locks and I discussed initially. Right now there's not much styling, and we could probably use some copy at the top of the page to explain what's going on. Additionally, the
index
route just contains a link that saysFilters page
, basically just so you can access it during dev. I'm not sure how we'll want to tie in the filters with the current deprecation categories.For reference, here's the filters link
In addition, here's a screen shot of the (WIP) filters page: