Skip to content

New addon - custom block shape - #1773

Merged
WorldLanguages merged 37 commits into
ScratchAddons:masterfrom
lisa-wolfgang:patch-3
Mar 18, 2021
Merged

New addon - custom block shape#1773
WorldLanguages merged 37 commits into
ScratchAddons:masterfrom
lisa-wolfgang:patch-3

Conversation

@lisa-wolfgang

@lisa-wolfgang lisa-wolfgang commented Mar 10, 2021

Copy link
Copy Markdown
Member

image
A screenshot of the latest version with the 2.0 Blocks preset

Resolves

Resolves #592 (and its 2 duplicates)
Resolves #953

Changes

This is a modification of @SheepTester's "Thinner Scratch blocks" -- the block padding, corner radius, and notch height can be changed by the user via settings in the corresponding addon, from 50% to 200% for padding, 0% to 300% for radius, and 0% to 150% for notch. The default 100% setting keeps the size the same as usual. Presets are also provided for commonly desired themes like Scratch 2.0.

Reason for changes

Many people would like a way to decrease block size for aesthetic reasons and because it allows more blocks to be seen on the screen at once without decreasing text size. The other options also cater to these people.

Known issues

  • Notch sizes greater than 100% have a very small line protruding into the notch (barely noticeable)
  • Changing the padding size doesn't change the vertical positions of blocks (a warning is given about this)

There are probably some other issues since this is my first addon contribution and I don't know the standards very well.

@Endermaster3690

This comment has been minimized.

@lisa-wolfgang lisa-wolfgang changed the title New addon - custom block size New addon - custom block shape Mar 10, 2021
@lisa-wolfgang

Copy link
Copy Markdown
Member Author

Just fixed some major issues.
Before:
image
After:
image

  • Fixed notch misalignment
  • Fixed text box text not being centered
  • Fixed gap between loop/statement edge and its contents

@TheColaber

TheColaber commented Mar 10, 2021

Copy link
Copy Markdown
Member

Please enable prettier at https://github.com/lisa-wolfgang/ScratchAddons/actions

@Endermaster3690

Endermaster3690 commented Mar 10, 2021

Copy link
Copy Markdown

Just fixed some major issues.

  • Fixed notch misalignment
  • Fixed text box text not being centered
  • Fixed gap between loop/statement edge and its contents

Great! Keep working, but another major bug is the Boolean still doing that. You know that but im just saying.

@lisa-wolfgang

Copy link
Copy Markdown
Member Author

Another update:

  • Added corner radius option (0% to 300%)
  • Fixed boolean sizing issue

Since I don't think there's anything left that I can fix, I'm opening it up for review.

@lisa-wolfgang
lisa-wolfgang marked this pull request as ready for review March 11, 2021 01:05
@Endermaster3690

This comment has been minimized.

@TheColaber

TheColaber commented Mar 11, 2021

Copy link
Copy Markdown
Member

Sometimes the flyout blocks are bigger than the blocks that get dragged out... this seems to be the case with all blocks that have inputs...
image
Reduce spacing: (in flyout)
image
Hmm...
image
Conflicts with cat-blocks right now, but this is my problem, don't worry, see #1809
image

@lisa-wolfgang lisa-wolfgang mentioned this pull request Mar 11, 2021
@Endermaster3690

This comment has been minimized.

@Hans5958

Copy link
Copy Markdown
Member

Please enable prettier at https://github.com/lisa-wolfgang/ScratchAddons/actions

@TheColaber Reminder: You actually don't need to activate the action. As long as the check passes (if you use Prettier on your enviroment), it's good. I think it is quite misleading to tell people to turn it on, instead of fixing the checks.

@lisa-wolfgang

Copy link
Copy Markdown
Member Author

New stuff -- notch height is now an option!
I'll also try to fix some more bugs if I can.

Comment thread addons/custom-block-shape/userscript.js Outdated
Comment thread addons/custom-block-shape/addon.json Outdated
Comment thread addons/custom-block-shape/userscript.js Outdated
Comment thread addons/custom-block-shape/userscript.js
Comment thread addons/custom-block-shape/addon.json
Comment thread addons/custom-block-shape/addon.json Outdated
Comment thread addons/custom-block-shape/userscript.js Outdated
Comment thread addons/custom-block-shape/userscript.js Outdated
Comment thread addons/custom-block-shape/userscript.js
Comment thread addons/custom-block-shape/userscript.js Outdated
@superscratch444tre

Copy link
Copy Markdown

Look:
image

There's a tiny dot....
padding 100, corner 54, notch 0

@lisa-wolfgang

Copy link
Copy Markdown
Member Author

There's a tiny dot....
padding 100, corner 54, notch 0

Thanks for reporting. This is part of a known issue, but fixing it would likely require complete control over the block rendering, which is likely to greatly increase the complexity of this addon.

@superscratch444tre

superscratch444tre commented Mar 17, 2021

Copy link
Copy Markdown

Thanks for reporting. This is part of a known issue, but fixing it would likely require complete control over the block rendering, which is likely to greatly increase the complexity of this addon.

I understand, but it looks very ugly (I have a big screen and it is very visible)

@lisa-wolfgang

Copy link
Copy Markdown
Member Author

Actually, thanks to GarboMuffin (again) I found the property that needs to be changed. Pushing soon!

@Hans5958 Hans5958 added the scope: addon Related to one or multiple addons label Mar 18, 2021
@Endermaster3690

Copy link
Copy Markdown

Is there notch width?

@WorldLanguages

Copy link
Copy Markdown
Member

2.0 is that you? 👀
image

@TheColaber

Copy link
Copy Markdown
Member

The future... is the past.

@WorldLanguages
WorldLanguages merged commit 6d672f5 into ScratchAddons:master Mar 18, 2021
@Chikorita-Lover

Copy link
Copy Markdown
Contributor

Hooray, it has been merged! 🎉

@lisa-wolfgang

Copy link
Copy Markdown
Member Author

Is there notch width?

Not right now, but perhaps in the future!

@Endermaster3690

Copy link
Copy Markdown

Is there notch width?

Not right now, but perhaps in the future!

cant wait for this to come in 1.11.1!

@superscratch444tre

Copy link
Copy Markdown

2.0 is that you? 👀
image

Combine this with https://mxmou.github.io/customize-scratch/scratch2Theme.user.js and it will really be scratch 2.0

@Endermaster3690

Copy link
Copy Markdown

Is there notch width?

Not right now, but perhaps in the future!

cant wait for this to come in 1.11.1!

my micro brain just realized it's 1.11.2 and its not here
hm guess its coming 1.12

GrahamSH-LLK added a commit that referenced this pull request Apr 1, 2021
* Bug fixes & code splitting

Fix bugs I introduced
Split up

* style: format code

* More changes

* style: format code

* Unified popup base css!

* style: format code

* Remove unneeded css

* style: format code

* Preload light.css

* style: format code

* Lower fouc

* [pull] master from ScratchAddons:master (#203)

* New strings from Transifex (#1908)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Better color picker for settings page (#1781)

* Init

* Removefile

* style: format code

* Popper, performance, and other changes

* style: format code

* Fix merge bug

* style: format code

* Changes

* style: format code

* Fixes

* No_popper

* style: format code

* Better transparency styling

* style: format code

* Light and dark modes!

* style: format code

* Match transparency gradients

* Slightly hacky fix for click outside

* style: format code

* Radius fix

* Proper library licensing

* style: format code

* Remove auto-close for now...

* Fixes

* style: format code

* Fixes

* Forked build, non-transparent

* style: format code

* 5 char change to mimic input[type=color]

* Sync thumb thingu

* style: format code

* Fix

* Update on drag

* Fix linted changes

* style: format code

* Non-transparent version

* style: format code

* Fix self

* style: format code

* Changes

* style: format code

* Fixes

* Update CREDITS.md

* one element

* style: format code

* Fix W_L's nitpicking

Co-authored-by: GrahamSH-LLK <GrahamSH-LLK@users.noreply.github.com>

* New Addon - 2D Color Picker! (#1768)

* add the addon

bruh lol

* Ran Prettier. Added beta tag

* h

h

* use addon.tab.scratchClass

* localization

idk if i did this correctly

* bruh

* aaaaaaaaaaaaaaaaaaaaaaaaaaa

* Update 2d-color-picker.json

* Update addon.json

* Fixed Shift functionality and added real-time color update!

* we do a little trolling

* scratch class

* Better description

Co-authored-by: WorldLanguages <mundofinky@gmail.com>

* New addon - custom block shape (#1773)

* Create addon.json

* Update addons.json

* Add files via upload

* Update addon.json

* Rename

* Update addon.json

* Update userscript.js

* Adjustments before PR

* Some adjustments

* Add corner option and fix notches

* Working corner size option

* style: format code

* Fixed up boolean issues

* style: format code

* Added notch height option

* style: format code

* Storing for later

* style: format code

* Fixed dropdowns and added higher padding cap

* Added presets, internal clean-up

* style: format code

* Changing padding now properly updates workspace

* Fix define hat corner issue

* style: format code

* Flyout partially updates on setting change

* style: format code

* Fixed C/E block corner issues

* style: format code

* Flyout now updates correctly

* Gave GarboMuffin much-deserved credit

* Suggested changes from GarboMuffin

* GarboMuffin editor refresh fix and suggested changes from RedGuy12

* Fixed corner path start position

* style: format code

* Remove beta tag

Co-authored-by: lisa-wolfgang <lisa-wolfgang@users.noreply.github.com>
Co-authored-by: WorldLanguages <mundofinky@gmail.com>

* Add error when scratchdb is down (#1830)

* Update userscript.js

* style: format code

* Update scratchstats.json

* Restore userscript.js

* Update userscript.js

* style: format code

Co-authored-by: RedGuy12 <RedGuy12@users.noreply.github.com>

* scratchblocks scroll (#1831)

* Update addon.json

* Create blocks.css

* Update blocks.css

* Update addon.json

* style: format code

* Update addon.json

* Update addon.json

Co-authored-by: RedGuy12 <RedGuy12@users.noreply.github.com>

* Make profile page banner less blurry (#1889)

* Make profile page banner less blurry

* Add blur

* Clarify setting name "blur"

Co-authored-by: WorldLanguages <mundofinky@gmail.com>

* Bump to v1.12.0-prerelease (#1911)

* New strings from Transifex (#1913)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Fix some bugs in editor-devtools (#1919)

* Fix lint error in 2d-color-picker

* editor-devtools: fix capitalization

* editor-devtools: do not show send to top in sounds

* support cmd key (#1923)

* Revert "support cmd key (#1923)" (#1924)

This reverts commit 0118d28.

* Fix anti-zalgo code (#1912)

* New strings from Transifex (#1927)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* New strings from Transifex (#1929)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Drag and drop files into the editor (#1916)

* Drag and drop files into the targets pane

* Make the costume, sound, and backdrop selector areas also file-droppable

* Show blue highlight when dragging a file over a drop area

* Fix losing drop area after switching between project and editor page...
...and add l10n: true

* Change descriptions, add "recommended" tag

Co-authored-by: WorldLanguages <mundofinky@gmail.com>

* Fix macos ctrl context menus on mute addon (#1925)

* Update userscript.js

* style: format code

* fix bug

Co-authored-by: GrahamSH-LLK <GrahamSH-LLK@users.noreply.github.com>
Co-authored-by: TheColaber <72760579+TheColaber@users.noreply.github.com>

* New strings from Transifex (#1933)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Dango Day Easter Egg (#1931)

* init commit

* style: format code

* why did i do this??

* style: format code

* forgot to / 1000

* Settings page: hide by default if not april fools

* style: format code

* Localize, fix CSS, add close button, remove unnecessary bitwise OR

* style: format code

* Credit Twemoji

* one char bug fix

* Update manifest

* Avoid "poof" if disabled

* Fix typo

* Remove fix unrelated to this PR

* Better logic on whether to show this addon, fix addon poofing (#1932)

* style: format code

* Remove unused CSS

* Make check for "dango" case insensitive

* Make it work in all 4 situations

* Only run on profiles (not in /followers etc)

Co-authored-by: TheColaber <TheColaber@users.noreply.github.com>
Co-authored-by: WorldLanguages <mundofinky@gmail.com>
Co-authored-by: WorldLanguages <WorldLanguages@users.noreply.github.com>

* New strings from Transifex (#1946)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Fix #1945 (#1947)

* Fix #1945

* Allow uploading entire folders at once

* Formatting

* Fix verifyBackpack check

* New strings from Transifex (#1957)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Use Comlink instead of `template#scratch-addons`, stop spamming contentScriptInfo (#1928)

* Use comlink, stop spamming contentScriptInfo

* style: format code

* Remove debugger;

* Fix typo

* Add Comlink to libraries

* Upload non-linted Comlink (from unpkg)

* Add comlink to libraries/CREDITS.md

* setMsgCount message: send object instead of integer directly

* Remove chrome.tabs.sendMessage debugging trap

* Remove window.onmessage debugging event

* style: format code

* Complete csInfoCache logic

* style: format code

* Fix todo

* Fix todo 2

* Fix todo 3

* Clarify todo 4

* Fix todo 5

Co-authored-by: WorldLanguages <WorldLanguages@users.noreply.github.com>

* Migrate scratchstats "followers over time" to ScratchDBv3 (#1955)

* Migrate scratchstats "followers over time" to ScratchDBv3

* style: format code

Co-authored-by: WorldLanguages <WorldLanguages@users.noreply.github.com>

* Reorder CS logic (#1958)

* Fix lint (#1959)

* Fix lint

* style: format code

Co-authored-by: apple502j <apple502j@users.noreply.github.com>

* Custom block shape semicolon "fix" (#1960)

* Fixed semicolon "glitch" for apple

* style: format code

Co-authored-by: lisa-wolfgang <lisa-wolfgang@users.noreply.github.com>

* v1.12.0 update notification, set new addons (#1964)

* v1.12.0 update notification, set new addons, mark old new addons as recommended

* Compress gif (-46%)

* New strings from Transifex (#1966)

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>

* Danger PR checks (#1941)

* Create danger.yml

* Create dangerfile.js

* style: format code

* Update dangerfile.js

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* Update dangerfile.js

* Update dangerfile.js

* style: format code

* Update danger.yml

* Update danger.yml

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* style: format code

* Update danger.yml

* Update dangerfile.js

* style: format code

* Update danger.yml

* Update dangerfile.js

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* Fixes

* Fix

* style: format code

* Message

* Del/additons

* Changes

* style: format code

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* style: format code

* Update danger.yml

* Delete package.json

* Delete package-lock.json

* Update danger.yml

* Update dangerfile.js

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* style: format code

* Update dangerfile.js

* style: format code

* Update danger.yml

* Update danger.yml

* Update dangerfile.js

* UPGRADE danger

* Update danger.yml

* Update danger.yml

* Rename dangerfile.js to .github/dangerfile.js

Co-authored-by: GrahamSH-LLK <GrahamSH-LLK@users.noreply.github.com>

* Allow setting variable names in Var Manager Addon (#1951)

* init

* style: format code

Co-authored-by: TheColaber <TheColaber@users.noreply.github.com>

Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>
Co-authored-by: GrahamSH <64214252+GrahamSH-LLK@users.noreply.github.com>
Co-authored-by: GrahamSH-LLK <GrahamSH-LLK@users.noreply.github.com>
Co-authored-by: Ucrash <35695734+GDUcrash@users.noreply.github.com>
Co-authored-by: WorldLanguages <mundofinky@gmail.com>
Co-authored-by: lisa-wolfgang <43426138+lisa-wolfgang@users.noreply.github.com>
Co-authored-by: lisa-wolfgang <lisa-wolfgang@users.noreply.github.com>
Co-authored-by: Paul Reid <paul@reid-family.org>
Co-authored-by: RedGuy12 <RedGuy12@users.noreply.github.com>
Co-authored-by: Maximouse <51849865+mxmou@users.noreply.github.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: meepooh <66320961+scratchusernamemrtbts@users.noreply.github.com>
Co-authored-by: easrng <easrng@gmail.com>
Co-authored-by: Sean <ussa.say@gmail.com>
Co-authored-by: TheColaber <72760579+TheColaber@users.noreply.github.com>
Co-authored-by: TheColaber <TheColaber@users.noreply.github.com>
Co-authored-by: WorldLanguages <WorldLanguages@users.noreply.github.com>
Co-authored-by: GarboMuffin <33787854+GarboMuffin@users.noreply.github.com>
Co-authored-by: apple502j <apple502j@users.noreply.github.com>
Co-authored-by: GrahamSH <grahamshllk@gmail.com>

* Wanna test something

* Remove file that is useless with proper css

* Compress additional svg

* Add xmlns back just in case

* Compress svgs even more

* Revert "Compress svgs even more"

This reverts commit efa42fd.

* Move imports for 🌟 speed 🌟

* style: format code

* Fix permissions

* More general cleanup

* Clean up setting inputs

* style: format code

* Fix media

Co-authored-by: GrahamSH-LLK <GrahamSH-LLK@users.noreply.github.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: scratchaddons-bot[bot] <73682299+scratchaddons-bot[bot]@users.noreply.github.com>
Co-authored-by: Ucrash <35695734+GDUcrash@users.noreply.github.com>
Co-authored-by: WorldLanguages <mundofinky@gmail.com>
Co-authored-by: lisa-wolfgang <43426138+lisa-wolfgang@users.noreply.github.com>
Co-authored-by: lisa-wolfgang <lisa-wolfgang@users.noreply.github.com>
Co-authored-by: Paul Reid <paul@reid-family.org>
Co-authored-by: RedGuy12 <RedGuy12@users.noreply.github.com>
Co-authored-by: Maximouse <51849865+mxmou@users.noreply.github.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: meepooh <66320961+scratchusernamemrtbts@users.noreply.github.com>
Co-authored-by: easrng <easrng@gmail.com>
Co-authored-by: Sean <ussa.say@gmail.com>
Co-authored-by: TheColaber <72760579+TheColaber@users.noreply.github.com>
Co-authored-by: TheColaber <TheColaber@users.noreply.github.com>
Co-authored-by: WorldLanguages <WorldLanguages@users.noreply.github.com>
Co-authored-by: GarboMuffin <33787854+GarboMuffin@users.noreply.github.com>
Co-authored-by: apple502j <apple502j@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: addon Related to one or multiple addons

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block shape Adjust block padding

10 participants