Skip to content

feat(GlDropdown): Add `toggleAttrs` prop

Peter Hegman requested to merge 1060-add-toggleattrs-prop-to-gldropdown into master

What does this MR do?

Closes #1060 (closed)

Vue Bootstrap doesn't support adding HTML attributes to the dropdown toggle button. This can make migrating E2E QA specs difficult because there is no way to add the data-qa-selector attribute. It previously came up in app/assets/javascripts/members/components/table/role_dropdown.vue#L40 and recently came up again in gitlab!50701 (comment 490092228)

This MR adds a toggleAttrs prop so that it is easier to add HTML attributes to the dropdown toggle. It would be nice to submit a PR upstream (planning on doing this) but it may or may not get accepted and could be a little while until it is accepted so this seems like a good temporary solution.

Does this MR meet the acceptance criteria?

Conformity

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
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports