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

Multicolored Comments #7437

Open
BlueDome77 opened this issue May 14, 2024 · 16 comments
Open

Multicolored Comments #7437

BlueDome77 opened this issue May 14, 2024 · 16 comments
Labels
new addon Related to new addons to this extension. `scope: addons` should still be added. scope: addon Related to one or multiple addons type: enhancement New feature for the project

Comments

@BlueDome77
Copy link

Why this would be helpful

Useful for when organizing code with comments.

How this addon works

Adds a button next to the delete button on comments that when clicked brings up the default or scratch color picker and changes the color of the comment.

Option to change the default comment color in the addon settings.

Presets maybe?

Possible alternatives

No response

Additional context

Screenshot 2024-05-14 at 3 19 14 PM

@BlueDome77 BlueDome77 added new addon Related to new addons to this extension. `scope: addons` should still be added. scope: addon Related to one or multiple addons type: enhancement New feature for the project labels May 14, 2024
@Samq64
Copy link
Member

Samq64 commented May 14, 2024

The customizable block colours addon already has an option to change the colour of comments, but not individually.

@DNin01
Copy link
Member

DNin01 commented May 14, 2024

Also note that the border of comments that are attached to blocks inherit the color of the block, so, for example, if a comment is attached to a motion block, its border will be colored blue.

But I don't think that would be a big problem.

@WorldLanguages
Copy link
Member

No one wants to say where the color would be stored?

@CubesterYT
Copy link

It could be a JSON tag stored in the comment text field. Non addon users would see that tag, addon users won't see the tag, but a colored comment.

@WorldLanguages
Copy link
Member

WorldLanguages commented May 16, 2024

It could be a JSON tag stored in the comment text field. Non addon users would see that tag, addon users won't see the tag, but a colored comment.

Those comments would be quite hard (unpleasant) to read by non addon users.

@DNin01
Copy link
Member

DNin01 commented May 16, 2024

Would it hurt to store color data internally in the project file? That wouldn't corrupt anything, right?

We could also store the data in a configuration comment in the stage (much like we do with Gamepad support). Every comment has an invisible ID, so this comment could contain key-value pairs, with the color associated with each comment by ID.

@DNin01
Copy link
Member

DNin01 commented May 16, 2024

Also, instead of using a color picker, we could show a palette of preset colors to choose from, or we could do both. It just means you could select colors faster.

@Secret-chest
Copy link
Contributor

Also, instead of using a color picker, we could show a palette of preset colors to choose from, or we could do both. It just means you could select colors faster.

If we store the full RGB code then we could do both. I'd like to have a customisable palette of 8 or so colours which would apply to each comment (changing colour 1 changes all comments with it)

@mxmou
Copy link
Member

mxmou commented May 17, 2024

It could be a JSON tag stored in the comment text field. Non addon users would see that tag, addon users won't see the tag, but a colored comment.

Those comments would be quite hard (unpleasant) to read by non addon users.

Why not just add the hex color code to the comment text (no JSON)?

@BroJac5246
Copy link
Contributor

It could be a JSON tag stored in the comment text field. Non addon users would see that tag, addon users won't see the tag, but a colored comment.

Those comments would be quite hard (unpleasant) to read by non addon users.

Why not just add the hex color code to the comment text (no JSON)?

Would that be more vulnerable to false positives? Maybe it could be preceded by a zero-width-space to help verify we added it?

@Secret-chest
Copy link
Contributor

Also, instead of using a color picker, we could show a palette of preset colors to choose from

I'm fine with there not being a picker, as long as we're not storing the hex code but a palette index. That would make it very hard to change the colours

@DNin01
Copy link
Member

DNin01 commented May 17, 2024

Also, instead of using a color picker, we could show a palette of preset colors to choose from

I'm fine with there not being a picker, as long as we're not storing the hex code but a palette index. That would make it very hard to change the colours

Not to say that customization is a bad thing, but this is one reason having only predetermined colors to choose from can be simpler to design and a nicer user experience.

Or, some ways to keep the color picker and make it easy to change all occurrences of a color could be:

  1. There are a few (maybe 8) preset colors to choose from, but you can change them. This palette would be global, so changing any one of these colors would update it across all comments.

or

  1. You can pick your own, custom colors to add to the palette, which could either start empty or have a few preset colors to start with. The palette would be global, so changing any one of these colors would update it across all comments. To change the color of a single comment, you would just add a new color to assign.

@WorldLanguages
Copy link
Member

Would it hurt to store color data internally in the project file? That wouldn't corrupt anything, right?

I think in general the guideline we use is that if it can be done with the backpack, then it can be done with an addon. For example, the debugger blocks (log, breakpoint, etc.) do not have any definitions within the same sprite, but you can also achieve that in vanilla Scratch by using the backpack, you just need to define those custom blocks in some other project and drag the custom block calls to the backpack.

@BlueDome77
Copy link
Author

Maybe this extension by SharkPool could spark some new ideas

@Secret-chest
Copy link
Contributor

There are a few (maybe 8) preset colors to choose from, but you can change them. This palette would be global, so changing any one of these colors would update it across all comments.

That's what I was trying to say. Instead of storing the RGB value we store an index of the palette.

@Secret-chest
Copy link
Contributor

Secret-chest commented May 18, 2024

If the palette index is too large (palette is too small), they should either repeat or use the default colour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new addon Related to new addons to this extension. `scope: addons` should still be added. scope: addon Related to one or multiple addons type: enhancement New feature for the project
Projects
None yet
Development

No branches or pull requests

8 participants