-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#554 Fixed the viewer crashing when trying to parse erroneous/invalid…
… variables. Overhauled variable creation/validation in the visual editor to supply reasonable defaults when creating new variables or changing variables from one type to another, and added relevant logic to display messages when there are errors present and highlight relevant inputs. Moved some CSS rules into new files closer to the components they're styling.
- Loading branch information
1 parent
b2413a6
commit 1206b75
Showing
9 changed files
with
299 additions
and
105 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
39 changes: 39 additions & 0 deletions
39
...pp/obojobo-document-engine/src/scripts/oboeditor/components/variables/variable-block.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,39 @@ | ||
@import '~styles/includes'; | ||
|
||
$variable-selected: #285aa4; | ||
|
||
.single-variable { | ||
border: none; | ||
background: transparent; | ||
font-family: 'Libre Franklin', Arial, sans-serif; | ||
width: 100%; | ||
cursor: pointer; | ||
margin: 0; | ||
color: inherit; | ||
font-size: 1em; | ||
background-color: $color-bg; | ||
border-bottom: solid 1px rgba(0, 0, 0, 0.1); | ||
border-right: solid 1px rgba(0, 0, 0, 0.1); | ||
padding: 0.5em; | ||
text-align: left; | ||
padding-left: 1em; | ||
|
||
h4 { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
small { | ||
font-size: 0.75em; | ||
|
||
&.error-count { | ||
display: block; | ||
color: $color-dangerous; | ||
} | ||
} | ||
} | ||
|
||
.variable-is-selected { | ||
border-right: none; | ||
color: $variable-selected; | ||
} |
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
Oops, something went wrong.