Skip to content

Fix rendering of history items in members filter bar

What does this MR do?

Follow-up to #228675 (closed) and !48272 (merged)

app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue history dropdown does not support GlFilteredSearchToken with option titles. For example:

{
  type: 'with_inherited_permissions',
  icon: 'group',
  title: s__('Members|Membership'),
  token: GlFilteredSearchToken,
  unique: true,
  operators: [{ value: '=', description: 'is' }],
  options: [
    { value: 'exclude', title: s__('Members|Direct') },
    { value: 'only', title: s__('Members|Inherited') },
  ],
},

This MR adds support for the title attribute on options

Screenshots (strongly suggested)

Group members filter bar

Before After
Screen_Shot_2020-12-09_at_3.44.17_PM Screen_Shot_2020-12-09_at_3.43.42_PM

Project -> Incidents filter bar

Also uses filtered_search_bar_root.vue. Screenshots should be the same

Before After
Screen_Shot_2020-12-09_at_3.46.47_PM Screen_Shot_2020-12-09_at_3.47.38_PM

Local testing

  1. Enable the group_members_filtered_search feature flag
    • bin/rails console
    • Feature.enable(:group_members_filtered_search)
  2. Create a group
  3. Add members in Group -> "Members"
  4. Use the filter bar and sort dropdown

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports

Loading