cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Add splash screen on Cockpit boot

Open ArturoManzoli opened this issue 7 months ago • 4 comments

Add a splash-screen to keep Cockpit's boot visually clean

  • Hides all syncing messages that appear when switching users, especially when creating a new user.
  • Until the new data-sync mechanism is implemented, a function compares the user data stored on the vehicle with the data in the browser; if every key from vehicle is present on browser storage and their values match, the splash screen closes.
  • Minimum display time: 5 s (≈ 2.5 s actually visible because other modules preload).
  • Maximum display time: 15 s (≈ 12.5 s visible).
  • Includes a close button, a full-screen toggle, and the splash screen can also be dismissed with the Esc key.

https://github.com/user-attachments/assets/0f43e014-9f4e-411a-8e2b-11032b24ade8

https://github.com/user-attachments/assets/2d844650-a022-4f13-aaf1-2ba701e7b0ce

Closes #1800

ArturoManzoli avatar May 05 '25 21:05 ArturoManzoli

Veeeeeery cool!!!

Could/should we add a transition when it disappears?

rafaellehmkuhl avatar May 05 '25 21:05 rafaellehmkuhl

Veeeeeery cool!!!

Could/should we add a transition when it disappears?

Good idea!

Done

ArturoManzoli avatar May 06 '25 08:05 ArturoManzoli

@ES-Alexander, can you take a look at the loading text? Maybe add some new funny lines as well?

ArturoManzoli avatar May 06 '25 09:05 ArturoManzoli

can you take a look at the loading text? Maybe add some new funny lines as well?

I'll try to look tomorrow :-)

ES-Alexander avatar May 06 '25 16:05 ES-Alexander

Tried this out, and it's really cool, but I think the logo window is too large - I think it should be more like the width of the user switcher, or slightly larger (but the BlueRobotics logo can probably about stay the size it is, so mainly the Cockpit logo and the lighthearted messages should be smaller, along with the window itself).

Done!

image

ArturoManzoli avatar May 08 '25 13:05 ArturoManzoli

@ES-Alexander , allright to merge this PR?

ArturoManzoli avatar May 16 '25 14:05 ArturoManzoli

@ArturoManzoli there's one thing I just realized: when developing, this will pop up on every hot-reload.

Can we add an option in the Dev menu to disable it?

Makes a lot of sense. I'll add that

ArturoManzoli avatar May 16 '25 18:05 ArturoManzoli

@ArturoManzoli there's one thing I just realized: when developing, this will pop up on every hot-reload.

Can we add an option in the Dev menu to disable it?

Done!

ArturoManzoli avatar May 16 '25 18:05 ArturoManzoli