Extract shared parts for Issues and Service Desk lists
Summary
While creating a Service Desk issues list, I decided to follow closely the solution used for Issues list. In the process, many constants, queries and util functions have been reused. The goal for this issue is to extract these to shared directory. Not everything was used 1:1. More details below.
Improvements
Right now Service Desk list imports shared elements from Issues directory. The goal is to decouple the two modules and have them import common parts from the shared directory.
- Move queries and base objects for search tokens into
~/vue_shared/components/filtered_search_bar/tokens/
directory. Note: there are CE and EE tokens. - Move common constants for search bar to
~/vue_shared/components/filtered_search_bar/constants
. Note: there are CE and EE consts. - Move common util functions to either
~/vue_shared/components/filtered_search_bar/filtered_search_utils.js
or~/vue_shared/issuable/list/
, if applicable.
Risks
Test list views for Issues and Service Desk, example urls on GDK:
- http://127.0.0.1:3000/jashkenas/Underscore/-/issues/service_desk
- http://127.0.0.1:3000/jashkenas/Underscore/-/issues
Involved components
app/assets/javascripts/issues/list/
app/assets/javascripts/service_desk/
app/assets/javascripts/vue_shared/issuable/list/
app/assets/javascripts/vue_shared/components/filtered_search_bar/
Optional: Intended side effects
none