block suggestions
-
convert tables to JSON
so currently, using the tables as variables is useful for when you wanna convert the table to JSON
However, there’s no way to convert them back unless you develop an algorithim to interpret the JSON and add columns and rows to the table using that JSON data. Could there be like a reporter block that looks like this?:
( https://scratchblocks.github.io/#?style=scratch3&script=(convert table [search_table v] to JSON data%3A%3Aoperators) )YouTube subscribe to channel widgets button
The article is here which shows how you can make a button on a website to https://developers.google.com/youtube/youtube_subscribe_button
I’m not sure though because although it wont be as interactive, an image with a link will also do, but I’m just throwing this suggestion out there because it would look good next to the other youtube blocks in the widgets section of the toolbox. -
For the new block for table, do you actually mean the opposite? “convert JSON [json data] to table [TABLENAME]”?
For the Youtube button, I’m not sure what you are suggesting? A new block?
-
@info-creaticode Oh yeah you’re right about the first, I made a mistake. And for the second one, yes, I’m suggesting a new block. Sorry for the late response.
-
NP. For the youtube block, can you please specify what it says on the block and what it does?
And for the table block, what would be a typical use case for it?
-
@info-creaticode Ok! I’ll make a mockup in a bit for the first one but first I’m gonna respond to the second one:
For the table block, i realized it should be a normal block, not a reporter, just what you said, and for it’s purpose, there’s many:- With CreatiCode, a lot of things are like infinitely easier to modify when they’re in a text form. For example, ChatGPT and stuff like regex help with this. I’ll use ChatGPT as an example: You can already feed an entire table to ChatGPT by just using "here’s a json table, can you change it to fit x criteria and be y rows long: ", a join block, and the table variable. ChatGPT would give you the modified table, but you can’t convert it back to a normal table. Or you could just have ChatGPT generate an entire table with just 1 message and very simply convert it to a CreatiCode table since JSON data isn’t very usable or helpful here.
- Also, just backwards compatibility. If you do something it’s nice to be able to undo it. Also, like the first one, being able to edit it raw as well with any methods. Additionally, tables are already stored as JSON so all this block would have to do is just put in a table directly using the JSON code provided in the table.
- Convienience. It’s just easier than importing I feel like
-
Got it. That makes sense. We will add that block.
-
@info-creaticode Just made a YouTube one:
That will generate this:<script src="https://apis.google.com/js/platform.js"></script> <div class="g-ytsubscribe" data-channelid="UC_FXfu97VJLbGM8TRBpS90g" data-layout="full" data-count="default"></div>
All the block needs to change is just the data-channelid and if “yes” is chose for dark theme, just add
data-theme="dark"
attribute to the div.Edit: code result: