Skip to content

Commit 0de6d6e

Browse files
authored
Merge pull request #8339 from sagemathinc/fix-tab-icon-compact
frontend/file tabs: fix compact design
2 parents 8a057f8 + d2c25c8 commit 0de6d6e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/packages/frontend/project/page/file-tab.tsx

+11-7
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ export function FileTab(props: Readonly<Props>) {
208208
// alerts only work on non-docker projects (for now) -- #7077
209209
const status_alerts: string[] =
210210
!onCoCalcDocker && name === "info"
211-
? (project_status
211+
? project_status
212212
?.get("alerts")
213213
?.map((a) => a.get("type"))
214-
.toJS() ?? [])
214+
.toJS() ?? []
215215
: [];
216216

217217
const other_settings = useTypedRedux("account", "other_settings");
@@ -294,8 +294,8 @@ export function FileTab(props: Readonly<Props>) {
294294
flyout === active_flyout
295295
? COLORS.PROJECT.FIXED_LEFT_ACTIVE
296296
: active_flyout == null
297-
? COLORS.GRAY_L
298-
: COLORS.GRAY_L0;
297+
? COLORS.GRAY_L
298+
: COLORS.GRAY_L0;
299299
const bg = flyout === active_flyout ? COLORS.GRAY_L0 : undefined;
300300

301301
return (
@@ -335,7 +335,6 @@ export function FileTab(props: Readonly<Props>) {
335335
// how to read: default color -> style for component -> override color if there is activity
336336
const icon_style: CSSProperties = {
337337
marginRight: "2px",
338-
marginLeft: "-10px",
339338
color: COLORS.FILE_ICON,
340339
...props.iconStyle,
341340
...(has_activity ? { color: "orange" } : undefined),
@@ -356,7 +355,7 @@ export function FileTab(props: Readonly<Props>) {
356355

357356
const icon =
358357
path != null
359-
? (file_options(path)?.icon ?? "code-o")
358+
? file_options(path)?.icon ?? "code-o"
360359
: FIXED_PROJECT_TABS[name!].icon;
361360

362361
const tags =
@@ -413,7 +412,12 @@ export function FileTab(props: Readonly<Props>) {
413412
>
414413
<div
415414
className="cc-project-fixedtab"
416-
style={{ textAlign: "center", width: "100%" }}
415+
style={{
416+
textAlign: "center",
417+
width: "100%",
418+
paddingLeft: "8px",
419+
paddingRight: "8px",
420+
}}
417421
>
418422
{btnLeft}
419423
</div>

0 commit comments

Comments
 (0)