Extract some javascript from main Admin and base script#7145
Extract some javascript from main Admin and base script#7145jordisala1991 wants to merge 1 commit intosonata-project:masterfrom
Conversation
|
WDYT about this kind of refactor @sonata-project/contributors . My idea is that it does not affect the Admin object that is accesible outside the scripts, so it won't break BC. The thing is. IMO we should provide a way for people to build its own sonata js, to do so with some guarantees, we should provide some scripts that are kind of "public", but have some other that are internal. Maybe we should provide:
And the rest we could treat them as internal OR expose them too. IMO since the files are not all well refactored, I am more of the opinion of internal, but at some point, with good refactored code, we might mark them as all public and live with it... Example: I want to build my own js and I pick all dependencies from my own node_modules because I want to upgrade admin-lte and I pick most of the sonata js code, BUT I want to override the getConfig function, because I want to pick config from somewhere else. |
614ae74 to
58c2d63
Compare
|
Could you please rebase your PR and fix merge conflicts? |
58c2d63 to
dfb4980
Compare
|
Please review @sonata-project/contributors . I need your opinions to move this forward or not. This is needed if we want to give to create some documentation on how to customize the assets, and in order to integrate the inline scripts |
|
I want to pass this as draft for now. Maybe there are other important things to do on Sonata before taking this one. |
|
Could you please rebase your PR and fix merge conflicts? |
Subject
I am targeting this branch, because this can only be done on master.
Part of #7049
Changelog
If we like this idea, I can refactor in small PRs all the current Javascript (and I am sure I can do it for 4.0 release, in time)