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

Add Monitor Styles #579

Merged
merged 62 commits into from
Aug 8, 2023
Merged

Add Monitor Styles #579

merged 62 commits into from
Aug 8, 2023

Conversation

TheShovel
Copy link
Contributor

Custom CSS extension, that lets you modify the CSS for variable and list displays.

Blocks:

  • Set CSS color of [general text, general background, general border, variable value box, variable value text, list label, list footer, list value box, list value text] to [Color]
  • Set CSS border size to [Number]
  • Set CSS roundness of [general borders, variable value box borders, list value box borders] to [Number]
  • Set CSS list scroll rule to [auto, hidden]
  • Set CSS position of variable with label [String] to x:[Number] y:[Number]
  • Set CSS position of list with label [String] to x:[Number] y:[Number]
  • Make a CSS gradient with [Color] and [Color] at angle [Angle]

Screenshot from 2023-06-14 13-27-59

All blocks change CSS properly in the editor view, and in the packaged project.

Most professional banner ever made.
CustomCSS

I beg you, just accept the pull request without making me fix Eslint errors, please.
The code is perfect, it's like Bill Gates himself wrote it. There CAN'T be errors. It is impossible.

@LilyMakesThings
Copy link
Contributor

Good lord the amount of lint errors, might wanna run npm run fix on that lol

@CST1229
Copy link
Collaborator

CST1229 commented Jun 14, 2023

image
there are more warnings than lines of code in this extension

@LilyMakesThings
Copy link
Contributor

image there are more warnings than lines of code in this extension

How on earth-

@TheShovel
Copy link
Contributor Author

image there are more warnings than lines of code in this extension

Yes, but the extension works. Those errors are just Garbo being picky as hell with how the code looks.

@GarboMuffin
Copy link
Member

warnings are unimportant and can be ignored (I fix them myself) -- don't pester people about them

errors are more serious -- try to get those fixed

@TheShovel
Copy link
Contributor Author

Eslint says 'scaffolding' is not defined, but it is, even though it is a packager only thing. It shouldn't be an error.

@LilyMakesThings
Copy link
Contributor

Eslint says 'scaffolding' is not defined, but it is, even though it is a packager only thing. It shouldn't be an error.

Eslint will also say "Blockly" or "ScratchBlocks" isn't defined. You just need to disable eslint for it:

// @ts-expect-error - scaffolding not typed yet
// eslint-disable-next-line no-undef

@TheShovel
Copy link
Contributor Author

I fixed every Eslint error.
I hope you stop laughing at there being more warnings than lines of code.

@LilyMakesThings
Copy link
Contributor

I fixed every Eslint error. I hope you stop laughing at there being more warnings than lines of code.

*laughing at how picky eslint is sometimes. It's a 1-command fix, nothing to worry about

@TheShovel
Copy link
Contributor Author

Blocks now follow these settings.
image

@TheShovel
Copy link
Contributor Author

Please wait until I change from using isPackaged to checking for scaffolding.

@BlueDome77
Copy link
Contributor

Would it be possible to resize variables and lists?

@TheShovel
Copy link
Contributor Author

Would it be possible to resize variables and lists?

Yes, but I said I won't add anything more until Garbo merges this.

@GarboMuffin
Copy link
Member

My last concern with this is that backgrounds and colors are both handled by "set color of [ ] to [ ]". Would it make sense to have a separate "set background of [ ] to [ ]", especially because backgrounds allow things like gradients and images while normal text color does not?

@TheShovel
Copy link
Contributor Author

I would keep it in the same block. It keeps stuff a little cleaner.

@TheShovel
Copy link
Contributor Author

I fixed some stuff.
This is now ready to be merged.

@GarboMuffin GarboMuffin merged commit dc1cc77 into TurboWarp:master Aug 8, 2023
1 check passed
@mudkipdev
Copy link

mudkipdev commented Oct 18, 2023

Would it be possible to resize variables and lists?

+1, can this be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants