CRUD icon indicating copy to clipboard operation
CRUD copied to clipboard

Cleanup sidebar.blade.php

Open promatik opened this issue 4 years ago • 4 comments

While testing https://github.com/Laravel-Backpack/CRUD/pull/3391, I noticed most of the javascript code was not being used, I believe it is replicated somewhere in the bundle.

By removing everything the sidebar still works, links are highlighted with active class. And menus are open when submenus are active.

promatik avatar Dec 19 '20 22:12 promatik

The inspection completed: No new issues

scrutinizer-notifier avatar Dec 19 '20 22:12 scrutinizer-notifier

Hmmm totally agree with the comments change, but in terms of JS... @promatik are you sure this code is somewhere else too? Because I don't remember it being anywhere else, or can I find it referenced in the bundle. Maybe your tests have used a cached version of the page so it was still working? AFAIK it shouldn't work without the JS.

tabacitu avatar Dec 21 '20 16:12 tabacitu

@tabacitu I found this very odd, look at this screenshot;

image

The code is commented, I double check on developer panel, and the sidebar still works 😅

On bundle.js there is this; image

I can't understand if it's doing the same, but looks like ...

promatik avatar Dec 21 '20 17:12 promatik

Thanks @promatik . I agree this should be done, but I don't think it's worth our time investigating this right now.

I feel like we've lost track a little bit, and we're doing a lot of COULDs, when our time would be better spend doing SHOULDs and MUSTs, so we can finish up 4.1. Let's reign it in a little bit, and focus on finishing 4.1.

I agree with this, but it's a problem for future us 😀 Moving to 4.2, let's forget about this until then.

tabacitu avatar Dec 23 '20 12:12 tabacitu

Hello @promatik

I am sorry to bring the bad news after so many time, but this is for sure breaking!

When I am creating a Monster in the main branch, Monster item is active on sidebar, while on this branch it's not.

main

image

this branch

image

@tabacitu was probably right and you used a cached file, or missed some scenarios.

I will be closing this, we can't and shouldn't merge this.

Cheers and sorry ma friend 🙏

pxpm avatar Oct 25 '22 14:10 pxpm