Frontend: Add sorting option of Star count
Summary
Support a new sorting option by star count. This is a simple option to the current dropdown that will pass a different arg to the sorting type.
We pass all sort option in app/assets/javascripts/ci/catalog/components/list/catalog_search.vue:55
, so we can add a new constant there with the key and the text. Then that option becomes usable in the dropdown automatically (the key value must equal what the BE expects as a value to the sort field).
Then add some tests for this option spec/frontend/ci/catalog/components/list/catalog_search_spec.js:80
to make sure that the sorting value can be changed along with the sorting order (ASC and DESC)
Proposal
Confirm purpose and User Reception (how does this benefit the user?)
Additional details
Some relevant technical details, if applicable, such as:
- Does this need a feature flag?
- Does there need to be an associated instrumentation issue created related to this work?
- Is there an example response showing the data structure that should be returned (new endpoints only)?
- What permissions should be used?
- Is this EE or CE?
-
EE -
CE
-
- Additional comments:
Implementation Table
Group | Issue Link |
---|---|
backend | #432449 (closed) |
frontend |
|
Links/References
Edited by Frédéric Caplette