Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overlay UI element #633

Closed
wants to merge 11 commits into from
9 changes: 7 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2
sphinx:
configuration: docs/source/conf.py

build:
os: ubuntu-22.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools:
python: "mambaforge-22.9"
conda:
environment: docs/environment.yml
sphinx:
configuration: docs/source/conf.py
13 changes: 11 additions & 2 deletions packages/widgets/src/tabbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ export class TabBar<T> extends Widget {
nextFocused?.setAttribute('tabindex', '0');
(nextFocused as HTMLElement).focus();
}
}
}
}

/**
Expand Down Expand Up @@ -1713,7 +1713,8 @@ export namespace TabBar {
return h.li(
{ id, key, className, title, style, dataset, ...aria },
this.renderIcon(data),
this.renderLabel(data)
this.renderLabel(data),
this.renderOverlay(data)
);
}
}
Expand Down Expand Up @@ -1755,6 +1756,14 @@ export namespace TabBar {
return h.div({ className: 'lm-TabBar-tabCloseIcon' });
}

renderOverlay(data: IRenderData<any>): VirtualElement {
if (data.title.label == 'Launcher') {
g547315 marked this conversation as resolved.
Show resolved Hide resolved
return h.div({ className: 'lm-TabBar-UI-Overlay.lm-mod-hidden' });
} else {
return h.div({ className: 'lm-TabBar-UI-Overlay' });
}
}

/**
* Create a unique render key for the tab.
*
Expand Down
18 changes: 18 additions & 0 deletions packages/widgets/style/tabbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,21 @@
box-sizing: border-box;
background: inherit;
}

.lm-TabBar-UI-Overlay {
position: absolute;
top: 67%;
left: 45%;
width: 47%;
height: 32%;
border-radius: 25%;
z-index: inherit;
text-align: center;
color: rgb(255, 255, 255);
background: rgb(51, 51, 51);
visibility: hidden;
}

.lm-TabBar-UI-Overlay.lm-mod-hidden {
display: none !important;
}
Loading