-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teacher tool: Show placeholder text when no project is loaded (#10303)
This was some low hanging fruit we discussed after the customer interviews which I didn't get around to fixing until just now. Since I don't want to spend too long on it, I've just done a "bare minimum" implementation. Haven't put together any nice graphics or anything like that, but I think it's still an improvement. I've also increased the contrast for placeholder text in the input field (a11y issue and also came up multiple times in the interviews) and fixed a null ref exception that came up in testing.
- Loading branch information
Showing
7 changed files
with
55 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/// <reference path="../../../localtypings/pxteditor.d.ts" /> | ||
|
||
import css from "./styling/MakecodeFramePlaceholder.module.scss"; | ||
|
||
interface IProps {} | ||
export const MakeCodeFramePlaceholder: React.FC<IProps> = () => { | ||
return ( | ||
<div className={css["makecode-frame-placeholder"]}> | ||
<i className="far fa-hand-point-up" /> | ||
<span>{lf("No project loaded.")}</span> | ||
<span>{lf("Enter a share link above to evaluate!")}</span> | ||
</div> | ||
); | ||
}; |
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
22 changes: 22 additions & 0 deletions
22
teachertool/src/components/styling/MakecodeFramePlaceholder.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.makecode-frame-placeholder { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
|
||
align-items: center; | ||
justify-content: center; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
|
||
color: var(--pxt-page-foreground); | ||
opacity: 0.65; | ||
font-size: 1.5rem; | ||
text-align: center; | ||
user-select: none; | ||
|
||
i { | ||
font-size: 1.5rem; | ||
} | ||
} |
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