Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue warnings in extensions action menu #13553

Open
rak-phillip opened this issue Feb 28, 2025 · 0 comments
Open

Vue warnings in extensions action menu #13553

rak-phillip opened this issue Feb 28, 2025 · 0 comments
Labels
kind/tech-debt Technical debt mixin A smaller issue that's a good candidate to mixin with other issues in a sprint QA/None research-needed Label for design issue that requires more technical research than what is in the issue description
Milestone

Comments

@rak-phillip
Copy link
Member

Opening the action menu on the Extensions page prints the following warning to the console:

[Vue warn]: Extraneous non-emits event listeners (devLoad, manageRepos, addRancherRepos, manageExtensionView) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option. 
  at <RcDropdown aria-label=undefined onUpdate:open=fn onDevLoad=fn<bound showDeveloperLoadDialog>  ... > 
  at <RcDropdownMenu button-role="tertiary" button-size="small" button-aria-label="Extensions menu"  ... > 
  at <ActionMenuShell data-testid="extensions-page-menu" button-role="tertiary" button-aria-label="Extensions menu"  ... > 
  at <Index class="outlet" onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< 
Proxy { <target>: {…}, <handler>: {…} }
 > > 
  at <RouterView key="/c/local/uiplugins" class="outlet" > 
  at <IndentedPanel class="pt-20" > 
  at <Plain onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< 
Proxy { <target>: {…}, <handler>: {…} }
 > > 
  at <RouterView> 
  at <App>

Details

This warning occurs because events emitted for custom actions are defined bye the actions object passed as a prop to ActionMenuShell.vue:

emit(
action.action,
{
action,
event,
...args,
route,
}
);

This implementation makes it difficult explicitly specify which events the component will emit, as they are user defined.

Proposed solution

Refactor ActionMenuShell.vue so that it emits a 'selected' event that contains a key/value pair to help consumers identify which item was selected. Consumers of ActionMenuShell.vue will need to be refactored to adhere to this new pattern.

@rak-phillip rak-phillip added kind/tech-debt Technical debt research-needed Label for design issue that requires more technical research than what is in the issue description labels Feb 28, 2025
@rak-phillip rak-phillip added this to the v2.12.0 milestone Feb 28, 2025
@codyrancher codyrancher added the mixin A smaller issue that's a good candidate to mixin with other issues in a sprint label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tech-debt Technical debt mixin A smaller issue that's a good candidate to mixin with other issues in a sprint QA/None research-needed Label for design issue that requires more technical research than what is in the issue description
Projects
None yet
Development

No branches or pull requests

2 participants