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

[FEATURE] Allow overriding/extending async admin components #218

Open
rohithmeethal opened this issue Sep 20, 2024 · 2 comments
Open

[FEATURE] Allow overriding/extending async admin components #218

rohithmeethal opened this issue Sep 20, 2024 · 2 comments

Comments

@rohithmeethal
Copy link

For admin components registered synchronously, it is possible to extend components methods using context menu.
But for components registered async, context menu does not provide override suggestion.
It would be nice to have this feature if possible.

eg:
Context menu does not show extend/override on sw-customer-list
Shopware.Component.register('sw-customer-list', () => import('./page/sw-customer-list'));

context-not-available

In old version of Shopware : We can get context menu to override the component

Component.register('sw-customer-list', {
    template,
    ....
    }

context-available

@shyim
Copy link
Collaborator

shyim commented Sep 20, 2024

The problem is I have no idea, that this export is an component. Idk if there is some way to understand that is export is an component

@rohithmeethal
Copy link
Author

I am sorry I also don't know if there is any way to identify the current file as component.

But for a dirty fix, if we just use some tag like

/**
* @component
* /

Will forcefully consider file as component ?
So I can just edit the source file and add the tag when I want to extend/override some component.

This would still save a lot of time for extending components, than going manually to create folder structure and creating component file.

I hope some other better method exists and hopefully someone will give a solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants