Stop forwarding listeners twice in frequent items wrappers

What does this MR do and why?

FrequentGroups and FrequentProjects (app/assets/javascripts/super_sidebar/components/global_search/components/) forwarded every parent listener to FrequentItems with v-on="glListeners()", while also re-emitting FrequentItems' only event, action, with their own handle. The consumer, GlobalSearchDefaultItems, listens with @action="trackItems", so the tracking handler ran twice per click on a frequently visited item.

The other event these wrappers expose, nothing-to-render, is emitted by the wrapper itself, so the forwarding carried nothing useful. This MR removes the forwarding and the glListeners mixin from both components, and removes the "forwards listeners to FrequentItems" spec tests, which exercised an event FrequentItems never emits.

This was found while making component stubs carry the real component's emits in !253493 (closed): the forwarding test started failing under Vue 3, and switching it to the real action event showed the handler being called twice.

References

Screenshots or screen recordings

Not applicable, no visual change.

How to set up and validate locally

  1. Open the global search panel from the super sidebar.
  2. Click a frequently visited project or group.
  3. Confirm the action tracking event is sent once. Before this change it was sent twice.

Specs:

yarn jest spec/frontend/super_sidebar/components/global_search/components
VUE_VERSION=3 yarn jest spec/frontend/super_sidebar/components/global_search/components

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading