Change in ovirt-engine[ovirt-engine-4.0]: webadmin, userportal: Improve Bootstrap/jQuery tooltip infra

Code Review gerrit at ovirt.org
Thu Nov 17 14:37:27 UTC 2016


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: webadmin,userportal: Improve Bootstrap/jQuery tooltip infra
......................................................................


webadmin,userportal: Improve Bootstrap/jQuery tooltip infra

Improve code & fix memory leaks while preserving existing look
and feel of tooltips.

- ElementTooltipUtils is the entry point for handling tooltips
  on DOM elements, containing all JavaScript/JSNI tooltip code

- WidgetTooltip allows attaching tooltip to GWT widget, using
  decorator design pattern (acting as widget wrapper, meaning
  that WidgetTooltip renders as the wrapped widget itself)

  <WidgetTooltip ui:field="myTooltip">
    <SomeWidget />
  </WidgetTooltip>

- *always* use WidgetTooltip when dealing with GWT widgets

- Cell hierarchy refactored to route native DOM event handling
  (onBrowserEvent) through ElementTooltipUtils#handleCellEvent

- added "reaper" functionality to destroy tooltips on detached
  DOM elements, covering:

  * cell widget tooltips [using repeating command]
  * popup content tooltips [upon closing each popup]

- update branding's javascripts.tag to use Bootstrap/jQuery
  version shipped through PatternFly (removed custom files)

Using Chrome Dev Tools, verified that both dialog- and grid-
related tooltips are now properly destroyed on dialog close
and after grid redraw, respectively.

Change-Id: I19800b61c151d41da80addf839b1bfa8b1eae992
Bug-Url: https://bugzilla.redhat.com/1368101
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M backend/manager/modules/branding/src/main/resources/META-INF/tags/obrand/javascripts.tag
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/gin/BaseSystemModule.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractPopupPresenterWidget.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/ElementTooltipUtils.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/ElementUtils.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/utils/JqueryUtils.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/AbstractPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/ConsolePopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/AbstractValidatedWidgetWithLabel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/AlertManager.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/MenuBar.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/UiCommandButton.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/UiCommandLink.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/WidgetDecorator.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/WidgetWithInfo.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionButton.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/AbstractActionPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/ActionButtonDefinition.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/DropdownActionButton.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/DropdownActionButton.ui.xml
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/SimpleActionButton.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/SimpleActionButton.ui.xml
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/SimpleDialogPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/TooltippedIcon.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/EntityModelCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/ListModelTypeAheadListBoxEditor.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/WidgetWithLabelEditor.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/AbstractLabelableEntityModelEditor.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/BaseEntityModelDetachableWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/generic/ListModelSuggestBoxEditor.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/form/key_value/KeyValueLineWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/label/LabelWithTextTruncation.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/label/LabelWithTooltip.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/panel/AlertPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/panel/AlertPanel.ui.xml
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/refresh/AbstractRefreshManager.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/refresh/BaseRefreshPanel.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/ColumnResizeCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/AbstractCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/AbstractEditableCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/AbstractImageButtonCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/AbstractInputCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/AbstractToggleButtonCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/Cell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/CheckboxCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/CompositeCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/EditTextCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/LinkCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/ListModelListBoxCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/PasswordTextInputCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/RadioboxCell.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/ResizableCell.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/ResizableCheckboxCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/SafeHtmlWithStyleCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/StatusCompositeCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/TextCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/cell/TextInputCell.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractColumn.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/TooltipColumn.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/header/AbstractCheckboxHeader.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/header/AbstractHeader.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/header/SafeHtmlHeader.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/header/TooltipHeader.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/ElementTooltip.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/ElementTooltipDetails.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/ProvidesTooltip.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/ProvidesTooltipForObject.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/Tooltip.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/TooltipConfig.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/TooltipMixin.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/TooltipWidth.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/WidgetTooltip.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/storage/AbstractSanStorageList.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/DoublePercentageProgressBar.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/QuotaCPUProgressBar.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/QuotaMemoryProgressBar.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/QuotaProgressBar.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/QuotaStorageProgressBar.java
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/basic/MainTabBasicListItemActionButton.ui.xml
M frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/widget/extended/vm/AbstractConsoleButtonCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostConfigureLocalStoragePopupView.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkItemPanel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkPanel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/TasksTree.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/CustomSelectionCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/MenuCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/NullableButtonCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/cell/VolumeStatusCell.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VmStatusColumn.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeStatusColumn.java
D packaging/branding/ovirt.brand/bootstrap-3.3.6-custom.js
D packaging/branding/ovirt.brand/jquery-1.11.3.min.js
D packaging/branding/ovirt.brand/mousetrack.js
97 files changed, 1,012 insertions(+), 4,556 deletions(-)

Approvals:
  Alexander Wels: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Greg Sheremeta: Verified; Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/66810
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I19800b61c151d41da80addf839b1bfa8b1eae992
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list