Open kingjia90 opened 1 year ago
what, if we just create two different JS files for that permission helper ... one for Pimcore 10 and one for Pimcore 11 and include them depending on the Pimcore version in use?
Or do we also have a problem when using perspectives in Pimcore 11 that where created in Pimcore 10 ?
AFAIK it would be more a visual and "cleanliness" problem, meaning that it would display "extra" stuff that might have no meaning nor effect, if the related bundle is not present/installed.
Splitting the file sounds good to me. For the 11 specific shorter list, we may need to add a priority property to each element and add them via event, similarly to navigation's change to keep the ordering the same.
In other bundles, we are adding these perspective this way or so https://github.com/pimcore/advanced-object-search/blob/d62779bf8eabb4afe299c7b3520ba04dd12f92b0/src/Resources/public/js/startup.js#L38-L48
Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.
Improvement description
Potentially we need to remove these perspectives from the list or have a bc layer for 10/11?
[ ] newsletter-bundle extracted https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L26
[ ] web-to-print-bundle https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L29
[ ] removal of import from server https://github.com/pimcore/perspective-editor/blob/1.x/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L55 removal of import from url https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L56 See also https://github.com/pimcore/pimcore/pull/15080
[ ] google-marketing-bundle https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L111-L114
[ ] reports https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L108
[ ] system-info https://github.com/pimcore/perspective-editor/blob/104ed6c132ad90167446cc4ed121c36b8d7449f2/src/Resources/public/js/pimcore/perspective/menuItemPermissionHelper.js#L128-L134
and so on...