Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use edit-mode to remove mini-widgets from the MiniWidgetBar #485

Merged

Conversation

rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Sep 18, 2023

This patch adds the possibility of controlling movement allowance on a per-widget basis. This was needed in cases where the widget has drag-and-drop features, like the MiniWidgetBar, as if one were to use this drag-and-drop features while on edit-mode, the widget would be moved, instead of the wanted behavior.

With that change, we modified the MiniWidgetBar so it doesn't have its own edit-mode anymore, and instead uses the regular general edit-mode from Cockpit to edit its interface.

Replaces direct usage of the `editingMode` variable, so widgets can benefit from directly controlling and overhiding the default behavior.
With this new approach, we are able to remove mini-widgets from the `MiniWidgetBar` in an intuitive and transparent way.

The user can basically drag mini-widgets out of the container while in edit-mode, instead of having to get out of edit-mode and click on the widget edit button.
@rafaellehmkuhl rafaellehmkuhl marked this pull request as ready for review September 18, 2023 21:26
@patrickelectric patrickelectric merged commit 0cb56f4 into bluerobotics:master Sep 19, 2023
5 checks passed
@rafaellehmkuhl rafaellehmkuhl deleted the fix-mini-widget-bar-edit branch September 19, 2023 12:09
@rafaellehmkuhl rafaellehmkuhl linked an issue Sep 21, 2023 that may be closed by this pull request
@ES-Alexander
Copy link
Contributor

Relevant to #448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove MiniWidgetBar dedicated edit-mode
3 participants