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

Blocks to code #609

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7d1313c
initial toolbox button styling based on scratch colors
just6660 May 18, 2022
b5e3320
updated range.json color
just6660 May 18, 2022
449215f
adding commas
just6660 May 18, 2022
821f404
color coding blocks v1
just6660 May 24, 2022
febfacc
pulled changes from master
just6660 May 24, 2022
275caf9
fixed arg pos with createDynamicEditCodeAction
May 24, 2022
f2cc0db
will enable/disable analytics with a switch
May 24, 2022
3f5fece
fixed varassignstatment colors, literal colors, arthmetic colors, com…
just6660 May 25, 2022
d849347
implemented white holes, literals have no background color, adjusted …
just6660 May 26, 2022
b2cb484
increase width of expression ConstructHighlights, fixed curosr highli…
just6660 May 30, 2022
f2375fc
changed CallbackType.fail color to less transparent red and reverts b…
just6660 May 30, 2022
7e2dd77
changed popup suggestion message color to black so it shows up on whi…
just6660 May 30, 2022
5c088cf
removed background color for literalvalexpr in replaceCode function
just6660 May 30, 2022
d4ed64d
fixed multiple holes issue
May 31, 2022
8445d77
closes #591
just6660 Jun 1, 2022
9234d88
make scopehighlight contain entire constructhighlights of body
just6660 Jun 1, 2022
3366607
Fixes #592
just6660 Jun 1, 2022
89e9ffc
Fixes #593
just6660 Jun 1, 2022
b39c827
Fixes #595 #596
just6660 Jun 2, 2022
f7f2b2f
changed while loop to have same color as for loop, modified orange co…
just6660 Jun 2, 2022
8c47362
commented out retrieveUser()
just6660 Jun 13, 2022
153712d
fixed end-line characters from CRLF to LF (Unix standard)
Jun 14, 2022
898f6ad
fixed merge conflict
Jun 14, 2022
865efba
Merge pull request #603 from MajeedKazemi/f7
MajeedKazemi Jun 14, 2022
3137a9f
fixed MethodCallModifier hole deletion
just6660 Jun 14, 2022
3540a8d
reimported IKeyboardEvent and IScrollEvent
just6660 Jun 14, 2022
d7e72bb
Merge pull request #607 from MajeedKazemi/methodcallmodifier-deletion
MajeedKazemi Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/css/hole.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
transition-duration: 0.2s;

border-radius: 5px;
background-color: white;
z-index: -998;
}

.editableHole {
Expand All @@ -29,7 +31,7 @@

.text-editable-expr-hole {
border-radius: 15px !important;
border-style: dashed !important;
border-style: dashed !important;
}

.empty-operator-hole {
Expand Down
4 changes: 2 additions & 2 deletions src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
}

.button {
color: #0d0c22;
color: white;
cursor: pointer;
border-radius: 4px;
display: flex;
Expand All @@ -49,7 +49,7 @@ body {
width: -webkit-fit-content;
width: -moz-fit-content;
width: fit-content;
border: solid 2px #fff;
border: none;
}

.button.button-invalid {
Expand Down
3 changes: 2 additions & 1 deletion src/css/messages.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
margin: 7px 7px 0 0;
font-size: 13px;
box-shadow: 0 0 3px 1px #aaa;


color:black;
background-color: #ffffff;
height: 17px;
padding: 3px 8px 3px 8px;
Expand Down
4 changes: 3 additions & 1 deletion src/css/toolbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ hole1 {
box-shadow: 0px 0px 1px 1px #0000005e inset;
margin: 0px 3px;
display: inline-block;
background-color:white;
}

hole2 {
Expand All @@ -60,6 +61,7 @@ hole2 {
border: dashed 1px #c7c7c7;
min-width: 12px;
height: 16px;
background-color: white;
}

#user-variables {
Expand Down Expand Up @@ -628,4 +630,4 @@ hole2 {

.cascaded-menu-extra-item .inline-var {
color: #aa5bc8;
}
}
5 changes: 4 additions & 1 deletion src/docs/add-var.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
]
}
],
"search-queries": ["create new variable", "variable", "var"]
"search-queries": ["create new variable", "variable", "var"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/add.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = \"hello\"\nb = \"world\"\nprint((a + \" \" + b))"
}
],
"search-queries": ["add", "sum"]
"search-queries": ["add", "sum"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/and.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 5\nb = 7\nc=2\n\nif ((a > c) and (b > c)):\n\tprint(\"Both expressions are true.\")"
}
],
"search-queries": ["and", "both", "and operator"]
"search-queries": ["and", "both", "and operator"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/assign-add.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 2\na += 2\nprint(a)"
}
],
"search-queries": ["add to variable"]
"search-queries": ["add to variable"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/assign-div.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 10\na /= 2\nprint(a)"
}
],
"search-queries": ["divide variable"]
"search-queries": ["divide variable"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/assign-mult.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 5\na *= 2\nprint(a)"
}
],
"search-queries": ["multiply variable"]
"search-queries": ["multiply variable"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/assign-sub.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 5\na -= 2\nprint(a)"
}
],
"search-queries": ["subtract from variable", "deduct from variable"]
"search-queries": ["subtract from variable", "deduct from variable"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/assign.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 123\nprint(a)\na=321\nprint(a)"
}
],
"search-queries": ["set", "assign", "assign variable", "set variable", "update value variable"]
"search-queries": ["set", "assign", "assign variable", "set variable", "update value variable"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/break.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@
]
}
],
"search-queries": ["exit", "loop", "break"]
"search-queries": ["exit", "loop", "break"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/choice.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "from random import choice\n\nif choice([1, 2, 3, 4, 5, 6]) == 6:\n\tprint(\"Rolled Six!\")"
}
],
"search-queries": ["choice", "random choice", "choose randomly from list", "select randomly from array"]
"search-queries": ["choice", "random choice", "choose randomly from list", "select randomly from array"],
"styles":{
"backgroundColor": "#a4e6a1"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-eq.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 5\nb = 5\nwhile a == b:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["compare equal", "check equal", "are equal"]
"search-queries": ["compare equal", "check equal", "are equal"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-gt.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 1\nb = 5\nwhile b > a:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["compare greater than", "compare", "check greater than"]
"search-queries": ["compare greater than", "compare", "check greater than"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-gte.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 1\nb = 5\nwhile b >= a:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["compare greater than or equal", "compare", "check greater than or equal"]
"search-queries": ["compare greater than or equal", "compare", "check greater than or equal"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 1\nb = 5\nwhile a < b:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["compare", "compare less than", "check less than"]
"search-queries": ["compare", "compare less than", "check less than"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-lte.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 1\nb = 5\nwhile a <= b:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["less than or equal", "compare", "compare less than or equal", "check"]
"search-queries": ["less than or equal", "compare", "compare less than or equal", "check"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/comp-ne.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "a = 1\nb = 5\nwhile a != b:\n\ta += 1\nprint(a)\nprint(a)"
}
],
"search-queries": ["not equal", "compare not equal", "not equal to", "are not equal"]
"search-queries": ["not equal", "compare not equal", "not equal to", "are not equal"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/div.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 2\nb = 10\nprint((b / a))"
}
],
"search-queries": ["divide", "division", "divide numbers"]
"search-queries": ["divide", "division", "divide numbers"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/elif.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
"id": "elif-after-elif"
}
],
"search-queries": ["else if", "else", "else condition", "choose", "path", "elif"]
"search-queries": ["else if", "else", "else condition", "choose", "path", "elif"],
"styles":{
"backgroundColor": "#FFAB19"
}
}
5 changes: 4 additions & 1 deletion src/docs/else.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 2\nif a > 3:\n\tprint(3)\nelif a > 4:\n\tprint(4)\nelif a == 5:\n\tprint(5)\nelif a > 6:\n\tprint(6)\nelse:\n\tprint(\"None of the above are true.\")"
}
],
"search-queries": ["else", "otherwise", "if"]
"search-queries": ["else", "otherwise", "if"],
"styles":{
"backgroundColor": "#FFAB19"
}
}
5 changes: 4 additions & 1 deletion src/docs/f-str-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "age = 16\nname = \"Alex\"\nprint(f'My name is {name} and I am {age} years old')"
}
],
"search-queries": ["formatted string item", "formatted text item"]
"search-queries": ["formatted string item", "formatted text item"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/f-str.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "age = 16\nname = \"Alex\"\nprint(f'My name is {name} and I am {age} years old')"
}
],
"search-queries": ["formatted string", "formatted text"]
"search-queries": ["formatted string", "formatted text"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/false.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "if False :\n\tprint(\"will not print\")\n\nif True :\n\tprint(\"will print\")"
}
],
"search-queries": ["false", "boolean"]
"search-queries": ["false", "boolean"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/find.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "name = \"Zimmer\"\nindexOfE = name.find(\"e\")\nprint(indexOfE)"
}
],
"search-queries": ["search text", "find text", "find string"]
"search-queries": ["search text", "find text", "find string"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/floor-div.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "a = 2\nb = 7\nprint((b / a))"
}
],
"search-queries": ["divide numbers", "divide integer", "divide floor"]
"search-queries": ["divide numbers", "divide integer", "divide floor"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/for.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@
"id": "loop-chars-of-str"
}
],
"search-queries": ["for", "loop", "repeat", "go through", "iterate", "list"]
"search-queries": ["for", "loop", "repeat", "go through", "iterate", "list"],
"styles":{
"backgroundColor": "#411b8c"
}
}
5 changes: 4 additions & 1 deletion src/docs/if.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"id": "check-val-variable"
}
],
"search-queries": ["if", "condition", "conditional", "choose", "path"]
"search-queries": ["if", "condition", "conditional", "choose", "path"],
"styles":{
"backgroundColor": "#FFAB19"
}
}
5 changes: 4 additions & 1 deletion src/docs/import.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "from random import randint\nprint(randint(1, 6))"
}
],
"search-queries": ["import module", "import random"]
"search-queries": ["import module", "import random"],
"styles":{
"backgroundColor": "#e897aa"
}
}
5 changes: 4 additions & 1 deletion src/docs/in.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "from random import randint\na = randint(1, 10)\nb = [1, 2, 3, 4, 5]\nif a in b:\n\tprint(\"a is inside b\")\n\nif a not in b:\n\tprint(\"a is not inside b\")"
}
],
"search-queries": ["in list", "inside list", "is inside list", "check inside list", "check list includes"]
"search-queries": ["in list", "inside list", "is inside list", "check inside list", "check list includes"],
"styles":{
"backgroundColor": "#59C059"
}
}
5 changes: 4 additions & 1 deletion src/docs/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "name = input(\"Hi! What’s your name?\")\nprint(name)"
}
],
"search-queries": ["input", "prompt", "text", "user", "ask input", "ask user"]
"search-queries": ["input", "prompt", "text", "user", "ask input", "ask user"],
"styles":{
"backgroundColor": "#5CB1D6"
}
}
5 changes: 4 additions & 1 deletion src/docs/join.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"example": "names = [\"Anna\", \"John\", \"Peter\"]\njoinedNames = \"-\".join(names)\nprint(joinedNames)"
}
],
"search-queries": ["join string", "join text"]
"search-queries": ["join string", "join text"],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/len.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@
"example": "items = [1, 2, 3]\na = len(items)\nprint(a)"
}
],
"search-queries": ["length of list", "length of string", "length of text"]
"search-queries": ["length of list", "length of string", "length of text"],
"styles":{
"backgroundColor": "#5CB1D6"
}
}
5 changes: 4 additions & 1 deletion src/docs/list-append.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"add to end list",
"append to end list",
"insert end list"
]
],
"styles":{
"backgroundColor": "#ebba8a"
}
}
5 changes: 4 additions & 1 deletion src/docs/list-element-assign.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"change value list index",
"update item at index",
"set value list index"
]
],
"styles":{
"backgroundColor": "#7c8ee6"
}
}
Loading