fix(GlCollapsibleListbox): reverse clear all logic
What does this MR do?
fix(GlCollapsibleListbox): reverse clear all logic
- discussion at !3462 (comment 1424588072)
- when not all of the items are selected, show select all
- update tests
Screenshots or screen recordings
Scenario | Before | After |
---|---|---|
Storybook | select_all_-_b | select_all_-_a |
gitlab example | - | Screen_Recording_2023-06-26_at_21.21.13 |
11 Instances of dropdowns using the clear all button
11 results - 11 files
app/assets/javascripts/analytics/shared/components/projects_dropdown_filter.vue:
239 @hidden="onHide"
240: @reset="onClearAll"
241 @search="setSearchTerm"
app/assets/javascripts/environments/components/environment_form.vue:
244 @select="onChange({ ...environment, clusterAgentId: $event })"
245: @reset="onChange({ ...environment, clusterAgentId: null })"
246 />
app/assets/javascripts/pages/admin/projects/components/namespace_select.vue:
124 searchable
125: @reset="onReset"
126 @search="search"
app/assets/javascripts/sidebar/components/status/status_dropdown.vue:
46 :items="$options.statusDropdownOptions"
47: @reset="handleReset"
48 />
app/assets/javascripts/sidebar/components/subscriptions/subscriptions_dropdown.vue:
45 :items="$options.subscriptionsDropdownOptions"
46: @reset="handleReset"
47 />
app/assets/javascripts/vue_shared/components/entity_select/entity_select.vue:
198 @search="search"
199: @reset="onReset"
200 @bottom-reached="onBottomReached"
ee/app/assets/javascripts/audit_events/components/stream/stream_filters.vue:
82 @select="$emit('input', $event)"
83: @reset="$emit('input', [])"
84 @select-all="selectAll"
ee/app/assets/javascripts/security_orchestration/components/policy_rule_multi_select.vue:
108 :toggle-text="text"
109: @reset="setSelected([])"
110 @select="setSelected"
ee/app/assets/javascripts/security_orchestration/components/protected_branches_dropdown.vue:
122 @select-all="handleSelect(listBoxItemsNames)"
123: @reset="handleSelect([])"
124 />
ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_result_policy/scan_filters/license_filter.vue:
137 @select-all="selectAllLicenseTypes"
138: @reset="resetLicenseTypes"
139 />
ee/app/assets/javascripts/vue_shared/components/runner_tags_dropdown/runner_tags_dropdown.vue:
184 @hidden="sortTags"
185: @reset="setSelection([])"
186 @search="debouncedSearchKeyUpdate"
Integration merge requests
-
GitLab: gitlab!124590 (merged) -
CustomersDot: Verified no dropdowns -
Status Page: Verified no dropdowns
Does this MR meet the acceptance criteria?
This checklist encourages the authors, reviewers, and maintainers of merge requests (MRs) to confirm changes were analyzed for conformity with the project's guidelines, security and accessibility.
Toggle the acceptance checklist
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidelines. -
If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer. -
If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer. -
If the MR changes a component's API, integration MR(s) have been opened (see integration merge requests above). -
Added the ~"component:*"
label(s) if applicable.
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
Accessibility
If this MR adds or modifies a component, take a few moments to review the following:
-
All actions and functionality can be done with a keyboard. -
Links, buttons, and controls have a visible focus state. -
All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label
for icons that have meaning or perform actions. -
Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false"
toaria-expanded="true"
when an accordion is expanded. -
Color combinations have sufficient contrast.
Closes #2240 (closed)
Related to fix(GlCollapsibleListbox): reverse clear all logic (!3523 - merged)
Related to fix(GlCollapsibleListbox): revert to previous c... (!3524 - merged)
Edited by Alexander Turinske