Skip to content

Commit 1c54e48

Browse files
committed
turn off toolbar labels, since we have excellent tooltips
1 parent 835c04c commit 1c54e48

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

src/packages/frontend/frame-editors/frame-tree/commands/manage.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const MAX_TITLE_WIDTH = 20;
2626
const MAX_SEARCH_RESULTS = 10;
2727
const ICON_WIDTH = "28px";
2828

29+
const BUTTON_LABELS = false;
30+
2931
export class ManageCommands {
3032
// TODO: setting this to FrameTitleBarProps causes type issues in frame-editors/jupyter-editor/editor.ts
3133
// So, there is probably a fundamental problem with that mapping into "AllActions"
@@ -480,19 +482,21 @@ export class ManageCommands {
480482
label = (
481483
<>
482484
{icon ?? <Icon name="square" />}
483-
<div
484-
style={{
485-
fontSize: "11px",
486-
color: "#666",
487-
marginTop: "-10px",
488-
// special case: button='' explicitly means no label
489-
width: cmd.button === "" ? undefined : "50px",
490-
overflow: "hidden",
491-
textOverflow: "ellipsis",
492-
}}
493-
>
494-
{buttonLabel}
495-
</div>
485+
{BUTTON_LABELS && (
486+
<div
487+
style={{
488+
fontSize: "11px",
489+
color: "#666",
490+
marginTop: "-10px",
491+
// special case: button='' explicitly means no label
492+
width: cmd.button === "" ? undefined : "50px",
493+
overflow: "hidden",
494+
textOverflow: "ellipsis",
495+
}}
496+
>
497+
{buttonLabel}
498+
</div>
499+
)}
496500
</>
497501
);
498502
} else {

src/packages/frontend/frame-editors/frame-tree/title-bar.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
10651065
title={label}
10661066
items={children}
10671067
button={false}
1068-
style={{ color: "#333", padding: 0, height: "36px" }}
1068+
style={{ color: "#333", padding: 0 }}
10691069
/>
10701070
);
10711071
} else {
@@ -1076,7 +1076,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
10761076
key={key}
10771077
disabled={disabled}
10781078
onClick={onClick}
1079-
style={{ color: "#333", padding: 0, height: "36px" }}
1079+
style={{ color: "#333", padding: 0 }}
10801080
>
10811081
{label}
10821082
</Button>
@@ -1104,11 +1104,10 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
11041104
style={{
11051105
borderBottom: popup ? undefined : "1px solid #ccc",
11061106
background: "#fafafa",
1107-
height: "36px",
1108-
opacity: is_active ? undefined : 0.5,
1107+
opacity: is_active ? undefined : 0.3,
11091108
}}
11101109
>
1111-
<div style={{ margin: "-1px 0 -1px 0" }}>{v}</div>
1110+
<div style={{ marginBottom: "-2px", paddingTop:'4px' }}>{v}</div>
11121111
</div>
11131112
);
11141113
}

src/packages/util/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"rootDir": "./",
55
"outDir": "dist"
66
},
7-
"exclude": ["node_modules", "dist", "test"]
7+
"exclude": ["node_modules", "../node_modules", "dist", "test"]
88
}

0 commit comments

Comments
 (0)