jeroennoten / Laravel-AdminLTE

Easy AdminLTE integration with Laravel
MIT License
3.78k stars 1.08k forks source link

[BUG] Cwrapper preloader going wrong on iFrame mode #1267

Open ruanpepe opened 3 months ago

ruanpepe commented 3 months ago

Describe the bug

The cwrapper mode preloader wile in iFrame mode shows a second menu while loading.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable iFrame mode
  2. Set preloader mode to 'crwapper'
  3. Open default home page
  4. See error

Expected behavior

A preloader in fullscreen only in the iFrame

Screenshots

https://github.com/jeroennoten/Laravel-AdminLTE/assets/42849081/9b934778-90a7-4c28-b4ed-92faabcc6466

Environment

Item Version
Laravel 11
Project v3.11.0
OS WSL ubuntu

Additional context

Maybe, check if iFrame mode is enabled before the preloader rendering is a solution.

dfsmania commented 3 months ago

Hi @ruanpepe , for what I have experimented, the iFrame mode has lots of bad visual effects and they are inherited from the underlying AdminLTE package, when they show a page embedded in the iFrame mode, the sidebar for example is removed using Javascript, but there is a transition animation that don't make it look smooth. Also, the AdminLTE package appears to be currently unmaintained , so I think we can't expect any improvements on how the i Frame mode works and we can't do much on this package to solve those issues.

Now, in relation to your problem, are you sure it's exclusively related to preloader on cwrapper mode, i.e, have you tested the same with the preloader disabled?

Also, as a workaround, you may try to increase the value in the loading_screen option of the iframe section (for example, to 2000). That way, maybe the loading screen may hide those bad visual effects that happen while loading the tab.

ruanpepe commented 3 months ago

Hi @dfsmania. How are you?

Yes. The iFrame mode is very useful, but it comes with some visual issues.

I tried now without preloader, and the behavior is still going bad. Then, i've been using the preloader with fullscreen mode and it was "hiding" the menu bug. I'll keep the preloader in fullscreen mode.

Thanks for your time.