-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/sharing entrypoint change (#1061)
* Implement per-file dropdown and add delete button and set-as-entrypoint button * Implement StliteKernel.reboot() and use it from Sharing * Allow to rename the entrypoint file * Show the entrypoint marker and improve the file tab style * Add a tooltip to the entrypoint marker * Add comment * Fix comment * Fix comment * Fix * Fix * Fix * Fix styling * Fix * Better styling and markup * Fix * Fix * Fix markup * Fix
- Loading branch information
Showing
14 changed files
with
375 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
162 changes: 103 additions & 59 deletions
162
packages/sharing-editor/src/Editor/components/Tab.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,134 @@ | ||
@use "variables" as var; | ||
@use "mixins"; | ||
|
||
.tabFrame { | ||
.tab { | ||
position: relative; | ||
display: inline-flex; | ||
align-items: center; | ||
box-sizing: border-box; | ||
margin-bottom: 4px; | ||
font-size: 0.8rem; | ||
background: rgba(0, 0, 0, 0.05); | ||
border: rgba(0, 0, 0, 0.1) 1px solid; | ||
border: rgba(0, 0, 0, 0.1) var.$border-width solid; | ||
height: var.$tab-height; | ||
line-height: normal; | ||
|
||
&:hover { | ||
background: initial; | ||
} | ||
|
||
&:has([role="tab"][aria-selected=true]) { | ||
background: initial; | ||
border-bottom: rgba(255,255,255,0) var.$border-width solid; | ||
|
||
&::before { | ||
content: ''; | ||
position: absolute; | ||
top: - var.$border-width; | ||
left: 0; | ||
width: 100%; | ||
height: var.$tab-highlight-height; | ||
background-color: var(--c-primary); | ||
} | ||
} | ||
} | ||
|
||
.tabFrame:hover { | ||
background: initial; | ||
} | ||
|
||
.tabFrameSelected { | ||
background: initial; | ||
border-top: var(--c-primary) var.$tab-highlight-height solid; | ||
margin-top: -(var.$tab-highlight-height); | ||
border-bottom: none; | ||
position: relative; | ||
} | ||
|
||
$tabPaddingLeft: 0.5rem; | ||
$deleteButtonSpaceWidth: 1.2rem; | ||
|
||
.tabButton { | ||
@include mixins.reset-button; | ||
|
||
display: inline-flex; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
padding-left: $tabPaddingLeft; | ||
padding-right: $deleteButtonSpaceWidth; | ||
padding: 0 0.5rem; | ||
} | ||
|
||
.editableTabBody { | ||
display: inline-block; | ||
position: relative; | ||
|
||
.fileNameForm { | ||
position: absolute; | ||
width: 100%; | ||
left: 0; | ||
top: 0; | ||
} | ||
|
||
.fileNameInput { | ||
@include mixins.reset-input; | ||
|
||
display: inline-block; | ||
width: 100%; | ||
} | ||
.fileNameInputError { | ||
border: red 1px solid; | ||
} | ||
} | ||
|
||
.deleteButtonContainer { | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
.entrypointIndicator { | ||
display: flex; | ||
align-items: center; | ||
padding-top: var.$tab-highlight-height; | ||
pointer-events: none; | ||
justify-content: center; | ||
margin-right: 0.3rem; | ||
position: relative; | ||
|
||
.tooltip { | ||
display: none; | ||
|
||
position: absolute; | ||
top: 0; | ||
transform: translate(0, -50%); | ||
left: 100%; | ||
z-index: 1; | ||
font-size: 0.7rem; | ||
text-align: center; | ||
border-radius: 6px; | ||
padding: 0.3rem 0.5rem; | ||
background-color: rgba(0,0,0,0.6); | ||
color: #fff; | ||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); | ||
pointer-events: none; | ||
} | ||
|
||
&:hover .tooltip { | ||
display: block; | ||
} | ||
} | ||
|
||
.deleteButton { | ||
.dropdownButton { | ||
@include mixins.reset-button; | ||
|
||
font-size: 0.6rem; | ||
|
||
padding: 0.2rem; | ||
|
||
pointer-events: initial; | ||
} | ||
.deleteButton:not([disabled]):hover { | ||
color: var(--c-primary); | ||
} | ||
|
||
.selectedTab { | ||
display: inline-block; | ||
padding-left: $tabPaddingLeft; | ||
padding-right: $deleteButtonSpaceWidth; | ||
} | ||
display: flex; | ||
width: 1rem; | ||
height: 100%; | ||
align-items: center; | ||
justify-content: center; | ||
margin-left: -0.5rem; | ||
|
||
.selectedTabInner { | ||
position: relative; | ||
} | ||
font-size: 0.6rem; | ||
cursor: pointer; | ||
|
||
.fileNameForm { | ||
display: inline-block; | ||
position: absolute; | ||
width: 100%; | ||
left: 0; | ||
top: 0; | ||
&:hover { | ||
color: var(--c-primary); | ||
} | ||
} | ||
|
||
.fileNameInput { | ||
@include mixins.reset-input; | ||
|
||
display: inline-block; | ||
width: 100%; | ||
} | ||
.fileNameInputError { | ||
border: red 1px solid; | ||
.dropdownContent { | ||
display: flex; | ||
flex-direction: column; | ||
background-color: var(--c-background); | ||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); | ||
|
||
button { | ||
background: none; | ||
border: none; | ||
padding: 8px 16px; | ||
text-align: left; | ||
cursor: pointer; | ||
width: 100%; | ||
|
||
&:hover { | ||
background-color: var(--c-background-hover); | ||
} | ||
} | ||
} |
Oops, something went wrong.