Skip to content

Commit 01c19df

Browse files
committed
updated IDE stylings
squash! squash! updated IDE stylings
1 parent d60262c commit 01c19df

8 files changed

Lines changed: 284 additions & 56 deletions

File tree

src/components/CaptiveContextMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const DropdownMenu: React.FC<PropsWithChildren<object>> = ({ children }) => {
245245
onKeyDown={onKeydown}
246246
data-captive-context-menu-container-id={ctx.containerId}
247247
>
248-
<Dropdown.Toggle as="div"></Dropdown.Toggle>
248+
<Dropdown.Toggle as="div"></Dropdown.Toggle>
249249
<Dropdown.Menu align="end">{children}</Dropdown.Menu>
250250
</Dropdown>
251251
);

src/components/Junior/ActivityContent.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React from "react";
22
import { EmptyProps, assertNever } from "../../utils";
33
import { useJrEditState } from "./hooks";
4-
import { MaybeContent, MaybeContent as MaybeLessonContent } from "./lesson/MaybeContent";
4+
import {
5+
MaybeContent,
6+
MaybeContent as MaybeLessonContent,
7+
} from "./lesson/MaybeContent";
58
import { WidthMonitor } from "./WidthMonitor";
69
import { HelpSidebar } from "../HelpSidebar";
710
import Tutorial from "../Tutorial";
@@ -28,7 +31,9 @@ export const ActivityContent: React.FC<EmptyProps> = () => {
2831
return (
2932
<>
3033
<WidthMonitor nonStageWd={980} />
31-
<MaybeContent />
34+
<div className={"bg-white h-100"}>
35+
<MaybeContent />
36+
</div>
3237
</>
3338
);
3439
case "helpsidebar":

src/components/Junior/CodeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const ScriptsEditor = () => {
144144
groupedFocusKey={`ActorProperties/${actorId}/code`}
145145
opts={{ onReorder }}
146146
>
147-
<div ref={scriptsDivRef} className="pt-2 pb-5 Junior-ScriptsEditor">
147+
<div ref={scriptsDivRef} className="pt-2 pb-5 Junior-ScriptsEditor flex-grow-1">
148148
{maybeNoContentHelp}
149149
<ol className="Junior-ScriptsList">{scriptsContent}</ol>
150150
</div>

src/components/demo-sidebar/DemoHeader.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ export const DemoHeader = ({
4949
return (
5050
<div className={classNames("chapter-pill", "rounded-pill")}>
5151
<FontAwesomeIcon icon={"layer-group"} />
52-
<span aria-label={`Chapter ${activeChapter + 1} out of ${headings.length}`}>
52+
<span
53+
aria-label={`Chapter ${activeChapter + 1} out of ${
54+
headings.length
55+
}`}
56+
>
5357
{activeChapter + 1}/{headings?.length}
5458
</span>
5559
</div>
@@ -60,7 +64,9 @@ export const DemoHeader = ({
6064
return (
6165
<Button
6266
aria-label={"Expand or collapse chapters navigation menu"}
63-
className={classNames("w-auto", "caret", "p-0", "ms-2")}
67+
className={classNames("w-auto", "caret", "p-0", "ms-2", {
68+
isNavigationExpanded,
69+
})}
6470
key={"nav-caret"}
6571
id={"nav-caret"}
6672
ref={navCaretRef}

src/demo-sidebar.scss

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ $chapter-navigation-link-height: 3rem;
2525
.demo-header {
2626
h1 {
2727
font-size: 1.1rem;
28+
margin: 0;
2829
}
2930

3031
padding: 0;
@@ -223,7 +224,7 @@ $chapter-navigation-link-height: 3rem;
223224
min-height: 0;
224225

225226
.chapter-markdown {
226-
line-break: anywhere;
227+
line-break: auto;
227228
overflow-x: clip;
228229
overflow-y: scroll;
229230
transition: max-height 0.1s cubic-bezier(.25, .8, .25, 1);
@@ -264,6 +265,16 @@ $chapter-navigation-link-height: 3rem;
264265

265266
#nav-caret {
266267
border: none;
268+
transition: transform 0.3s cubic-bezier(.25, .8, .25, 1),
269+
background-color 0.3s cubic-bezier(.25, .8, .25, 1);
270+
271+
&.isNavigationExpanded {
272+
transform: rotateZ(180deg);
273+
}
274+
275+
&:hover {
276+
color: $pytch-colour-main-yellow;
277+
}
267278
}
268279
}
269280

@@ -358,18 +369,6 @@ $chapter-navigation-link-height: 3rem;
358369
}
359370
}
360371

361-
.nav-caret {
362-
transition: transform 0.3s cubic-bezier(.25, .8, .25, 1);
363-
364-
&.isNavigationExpanded {
365-
transform: rotateZ(180deg);
366-
}
367-
368-
&:hover {
369-
color: $pytch-colour-main-yellow;
370-
}
371-
}
372-
373372
.loading {
374373
cursor: progress;
375374
}

src/font-awesome-lib.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,21 @@ import {
3939
faExclamationCircle,
4040
faWindowMinimize,
4141
faKeyboard,
42+
faFloppyDisk,
43+
faCamera,
44+
faClone,
45+
faCode,
46+
faDownload,
47+
faEllipsisV,
48+
faEllipsisH,
4249
faShare,
4350
faLayerGroup,
4451
faSearch
4552
} from "@fortawesome/free-solid-svg-icons";
4653

54+
import { faGoogleDrive } from '@fortawesome/free-brands-svg-icons'
55+
56+
4757
import { faTimesCircle, faEnvelope } from "@fortawesome/free-regular-svg-icons";
4858

4959
library.add(
@@ -87,6 +97,15 @@ library.add(
8797
faExclamationCircle,
8898
faWindowMinimize,
8999
faKeyboard,
100+
faTimesCircle,
101+
faFloppyDisk,
102+
faCamera,
103+
faClone,
104+
faCode,
105+
faDownload,
106+
faGoogleDrive,
107+
faEllipsisV,
108+
faEllipsisH,
90109
faTimesCircle,
91110
faShare,
92111
faLayerGroup,

src/pytch-ide.scss

Lines changed: 80 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@ $stage-controls-height: 37.6px;
2626
}
2727
.FullScreenStage {
2828
margin: auto;
29-
30-
.run-stop-controls {
31-
display: flex;
32-
flex-direction: row;
33-
34-
> * {
35-
margin-left: 16px;
36-
}
37-
38-
> *:first-child {
39-
margin-left: 0px;
40-
}
41-
}
4229
}
4330
}
4431

@@ -182,11 +169,12 @@ $stage-controls-height: 37.6px;
182169
}
183170

184171
#pytch-canvas {
185-
border: $canvas-border-width solid grey;
172+
border: $canvas-border-width solid $pytch-colour-main-blue-darkened;
186173
border-radius: 2px;
187174
background: white;
188175
display: block;
189176
visibility: visible;
177+
box-shadow: rgba(99, 99, 99, 0.05) 0px 2px 8px 0px;
190178

191179
&.resize-active {
192180
visibility: hidden;
@@ -298,7 +286,6 @@ $speech-bubble-max-height: 180px;
298286
grid-template-rows: auto 1fr;
299287
position: relative;
300288
z-index: 0;
301-
302289
/* Override Ace's ordering of fonts to avoid Monaco-related
303290
mis-rendering in Safari.
304291
https://github.com/ajaxorg/ace/issues/3385
@@ -307,6 +294,10 @@ $speech-bubble-max-height: 180px;
307294
font-family: $monospace-fonts;
308295
}
309296

297+
.tab-content {
298+
border-radius: 0 0 10px 10px;
299+
}
300+
310301
.ReadOnlyOverlay {
311302
z-index: 10;
312303
position: absolute;
@@ -438,11 +429,13 @@ $speech-bubble-max-height: 180px;
438429
}
439430

440431
&.GreenFlag {
441-
@include as-bootstrap-button(#2c2, #1a1);
432+
@include as-bootstrap-button($pytch-colour-accent-cyan, $pytch-colour-accent-cyan);
433+
border-radius: 10px 0 0 10px;
442434
}
443435

444436
&.RedStop {
445-
@include as-bootstrap-button(#e33, #c11);
437+
@include as-bootstrap-button($pytch-colour-accent-flame, $pytch-colour-accent-flame);
438+
border-radius: 0 10px 10px 0;
446439
}
447440
}
448441

@@ -956,3 +949,73 @@ ul.ClipArtTagButtonCollection {
956949
}
957950
}
958951
}
952+
953+
.btn-primary {
954+
@include as-bootstrap-button(#306998, #306998);
955+
}
956+
957+
.btn.square-button {
958+
width: 36px;
959+
height: 36px;
960+
padding: 0;
961+
}
962+
963+
.run-stop-controls {
964+
display: flex;
965+
flex-direction: row;
966+
}
967+
968+
.moreOptionsDropdown {
969+
button.btn.btn-primary {
970+
background-color: transparent;
971+
border-color: transparent;
972+
color: black;
973+
974+
&:hover {
975+
background-color: #c2d5dd;
976+
border-color: transparent;
977+
color: black;
978+
}
979+
980+
&.show {
981+
background-color: #c2d5dd;
982+
border-color: transparent;
983+
color: black;
984+
985+
&:hover {
986+
background-color: #c2d5dd;
987+
border-color: transparent;
988+
color: black;
989+
}
990+
}
991+
992+
&::after {
993+
display: none !important;
994+
}
995+
}
996+
}
997+
998+
.dropdown-menu {
999+
1000+
&:first-child {
1001+
margin-top: 0;
1002+
}
1003+
1004+
&.show {
1005+
border: 0;
1006+
box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
1007+
padding: 6px;
1008+
border-radius: 10px;
1009+
}
1010+
1011+
.dropdown-item {
1012+
border-radius: 10px;
1013+
margin: 4px 0;
1014+
padding-top: 6px;
1015+
padding-bottom: 6px;
1016+
}
1017+
}
1018+
1019+
.full-screen {
1020+
margin-right: auto;
1021+
}

0 commit comments

Comments
 (0)