Update UsersController#activity action to return json/html response based on feature flag
Currently app/controllers/users_controller.rb
has 8 actions that are used for the user tabs. These actions are activity
, groups
, contributed
, projects
, starred
, snippets
, followers
, and following
. Currently these actions return HTML that is generated from a HAML partial. We need them to return JSON so that our new Vue components can build the HTML.
This issue is responsible for making changes to the activity
action.
Implementation plan
- In
render.json
block ofUsersController#activity
add a check for theprofile_tabs_vue
feature flag introduced in #378688 (closed) - If the feature flag is disabled return what is currently implemented
- If the feature flag is enabled return the collection as JSON
Availability and Testing
- Since this will be introduced behind an already existing feature flag that is not yet enabled by default, please also create a draft MR that includes these changes with the feature flag definition file set to
default_enabled: true
. This will then trigger theee:instance-parallel
andee:instance-parallel-ff-inverse
jobs withine2e:package-and-test
to E2E test the changes with the FF both on and off (see https://docs.gitlab.com/ee/development/testing_guide/end_to_end/feature_flags.html#automatic-test-execution-when-a-feature-flag-definition-changes for more details)
Edited by Mansoor Khan