vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
620 stars 167 forks source link

Make it possible to hide the Vaadin development mode dialog without disabling it #8760

Open mstahv opened 4 years ago

mstahv commented 4 years ago

Currently the development mode dialog is only used for live reload. At least one user would like to use the live-reload itself, but disable the visualisation. So we'd need some way to hide the dialog and a way to make it visible again. It can be hidden with CSS and UI for it could be created easily, but how to make it possible to make it visible againšŸ¤” An API one can use via browser development console?

joheriks commented 4 years ago

As a workaround to hide it permanently while keeping the live reload functionality, add the following snippet to your gobal style rules:

vaadin-devmode-gizmo {
  visibility: hidden;
}
joheriks commented 4 years ago

Noting that the current configuration parameter devmode.liveReload.enabled does not fit this purpose: it does at the moment actually hide the dialog, but its primary purpose is to enable/disable live reload functionality (hiding only because currently the dialog is only about that). So if/when the mode dialog acquires other features (not related to live reload) in the future, even setting this parameter to false may no longer have the effect of hiding the dialog.

So dialog visibility is an orthogonal requirement. Sketch of a possible design:

Hiding the dialog, rather than live reload per se, is primarily what #8255 is about as well. Attaching / detaching the dialog from DOM rules out issues with selectors.

javier-godoy commented 1 year ago

Just noting that in newer versions of the framework, the style for hiding the dev tools is vaadin-dev-tools {display:none}