Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: tracing/tracing/ui/side_panel/side_panel_container.html

Issue 3001613002: Fix trace-viewer's side-panel-container's tab-strip. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tracing/tracing/ui/side_panel/side_panel_container_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/side_panel/side_panel_container.html
diff --git a/tracing/tracing/ui/side_panel/side_panel_container.html b/tracing/tracing/ui/side_panel/side_panel_container.html
index 9f75c8ada1f291e5743dca59cdadbe02235e8912..f46bb74f6c65940142f381c9af9908d28ac8764a 100644
--- a/tracing/tracing/ui/side_panel/side_panel_container.html
+++ b/tracing/tracing/ui/side_panel/side_panel_container.html
@@ -48,7 +48,9 @@ found in the LICENSE file.
}
tab-strip > tab-strip-label {
+ flex-shrink: 0;
-webkit-writing-mode: vertical-rl;
+ white-space: nowrap;
display: inline;
margin-right: 1px;
min-height: 20px;
@@ -113,6 +115,9 @@ Polymer({
'change', this.onSelectionChanged_);
this.brushingStateController_.addEventListener(
'model-changed', this.onModelChanged_);
+ if (this.model) {
+ this.onModelChanged_();
+ }
}
},
@@ -211,9 +216,11 @@ Polymer({
Polymer.dom(this.tabStrip_).textContent = '';
const supportedPanelTypes = [];
+ const panelTypeInfos =
+ tr.ui.side_panel.SidePanelRegistry.getAllRegisteredTypeInfos();
+ const unsupportedLabelEls = [];
- for (const panelTypeInfo of
- tr.ui.side_panel.SidePanelRegistry.getAllRegisteredTypeInfos()) {
+ for (const panelTypeInfo of panelTypeInfos) {
const labelEl = document.createElement('tab-strip-label');
const panel = panelTypeInfo.constructor();
const panelType = panel.tagName;
@@ -229,12 +236,21 @@ Polymer({
this.activePanelType =
this.activePanelType === panelType ? undefined : panelType;
}.bind(this, panelType));
+ Polymer.dom(this.tabStrip_).appendChild(labelEl);
} else {
if (this.activePanel) {
this.activePanelContainer_.removeChild(this.activePanel);
}
this.removeAttribute('expanded');
+ unsupportedLabelEls.push(labelEl);
}
+ }
+
+ // Labels do not shrink, so when the user drags the analysis-view up, the
+ // bottom labels are obscured first.
+ // Append all unsupported panel labels after all supported panel labels so
+ // that unsupported panel labels are obscured first.
+ for (const labelEl of unsupportedLabelEls) {
Polymer.dom(this.tabStrip_).appendChild(labelEl);
}
« no previous file with comments | « no previous file | tracing/tracing/ui/side_panel/side_panel_container_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698