bluerobotics / cockpit

An intuitive and customizable cross-platform ground control station for remote vehicles of all types.
https://docs.bluerobotics.com/ardusub-zola/software/control-station/Cockpit-1.0/overview/
Other
46 stars 19 forks source link

Move widgets away from bars #911

Closed rafaellehmkuhl closed 1 month ago

rafaellehmkuhl commented 3 months ago

With this patch, widgets will not go under the top/bottom bar when the window is resized, nor the user will be able to move a widget to under the bars, with the exception being full-screened widgets.

I will keep this as draft for now to make sure I'm happy with the solution, and I've tested for all edge-cases.

Fix #634

Before:

https://github.com/bluerobotics/cockpit/assets/6551040/9fca0261-f944-418a-82a2-60eef3b4d7d0

After:

https://github.com/bluerobotics/cockpit/assets/6551040/f7228c3c-023e-4fd9-a6df-e2b86a0dfe75

https://github.com/bluerobotics/cockpit/assets/6551040/43be5008-494c-4a1f-949c-c86230a19796

rafaellehmkuhl commented 1 month ago

I'm not sure if its related with this modifications, but the widgets present on the default MAV profile can't be moved on edit mode. If I add a new one, it behaves normally. I think it might be related with the initial position of the widgets on the /src/assets/defaults.ts

Once you refresh the browser, the problem goes away, right? If so, it's a bug we have already, not related to this PR.

ArturoManzoli commented 1 month ago

Once you refresh the browser, the problem goes away, right? If so, it's a bug we have already, not related to this PR.

It didn't go away refreshing the browser. But the problem didn't exist while testing the PR #990, that will be merged right after this one. I think its safe to merge this one and merge the 990 right away.

Besides this, the PR is approved.