Vojtech Szocs has posted comments on this change. Change subject: webadmin: Store subtab in browser ......................................................................
Patch Set 1: (1 comment) Two questions: * this patch only affects WebAdmin, don't we want to remember sub-tab height for UserPortal too? * this patch manages the height of single (most recently shown) sub-tab, don't we want to manage height separately for different sub-tabs? http://gerrit.ovirt.org/#/c/35178/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/MainContentView.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/MainContentView.java: Line 69: } Line 70: } Line 71: Line 72: private int getSubTabHeight() { Line 73: int subTabHeight = splitPanel.getOffsetHeight() / 2; Since calculating offset height of DOM element might be potentially expensive operation in some browsers, please consider moving it to a place where it's really needed, for example: String storedHeight = clientStorage.getLocalItem(SUB_TAB_HEIGHT_KEY); if (storedHeight != null) { ... } else { int subTabHeight = splitPanel.getOffsetHeight() / 2; subTabHeight = (subTabHeight > subTabPanelMaxHeight) ? subTabPanelMaxHeight : subTabHeight; } Line 74: String storedHeight = clientStorage.getLocalItem(SUB_TAB_HEIGHT_KEY); Line 75: if (storedHeight != null) { Line 76: try { Line 77: subTabHeight = Integer.parseInt(storedHeight); -- To view, visit http://gerrit.ovirt.org/35178 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2a7cb529914703e71da9ac323ee15bdb68b1449a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches