Skip to content

Refactor dynamically called methods to be more explicit

What does this MR do and why?

Related to #326354 (closed)

In the members_table.vue component we were dynamically calling some methods based on a string value defined in a constant. While this had some benefits in terms of flexibility it was pretty confusing and tough to figure out what was going on. This MR refactors those dynamically called methods to be more explicitly called.

See !57633 (comment 541093138) for an example of how they were confusing.

Screenshots or screen recordings

No visual changes, screenshots below to show nothing has changed.

Actions column is not shown on mobile if there are not actions available

Before After
Screen_Shot_2022-01-12_at_1.56.34_PM Screen_Shot_2022-01-12_at_1.51.57_PM

Actions column is not shown to logged out users

Before After
Screen_Shot_2022-01-12_at_1.55.48_PM Screen_Shot_2022-01-12_at_1.53.48_PM

How to set up and validate locally

  1. Create a public group
  2. Create a public project in that group
  3. Add some members to the group in Group overview -> Members
  4. Navigate to the project you created -> Project overview -> Members
  5. View the members table on mobile. The inherited members should not have an Actions row displayed
  6. Sign out and view the members table. The Actions column should not be displayed

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports