Follow up: remove user_popover#workInformation in favor of UserHelper#work_information
Summary
Original Issue: #24072 (closed)
Original MR: !25155 (merged)
See !25155 (comment 304200120) for initial discussion.
In app/assets/javascripts/vue_shared/components/user_popover/user_popover.vue there is a workInformation method that is pretty much a JS port of the work_information method in app/helpers/users_helper.rb. If we expose work_information to the /api/v4/users/{id} endpoint we could remove a fair amount of frontend code.
Work Required
- Remove
workInformationrelated methods and displaywork_informationsupplied by/api/v4/users/{id} - Update tests in
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
- Expose
work_informationto/api/v4/users/{id}and update required tests
Improvements
- Reduce amount of frontend code (smaller code footprint)
Risks
Low risk
Involved components
app/assets/javascripts/vue_shared/components/user_popover/user_popover.vuespec/frontend/vue_shared/components/user_popover/user_popover_spec.jslib/api/entities/user.rbspec/requests/api/users_spec.rb
Edited by Peter Hegman