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

Fix "split by blocks", add block to text and text to blocks #1514

Open
gsteinLTU opened this issue Feb 22, 2024 · 1 comment
Open

Fix "split by blocks", add block to text and text to blocks #1514

gsteinLTU opened this issue Feb 22, 2024 · 1 comment

Comments

@gsteinLTU
Copy link
Member

This issue is mostly notes for actually porting this feature over.

The "blocks" feature is in the dropdown for "split _ by _", but is not functional.

Our split:

Process.prototype.reportTextSplit = function (string, delimiter) {

Snap! split handling "blocks" option: https://github.com/jmoenig/Snap/blob/5937085ed8c0837f82d7372d1eb938ae7fc07362/src/threads.js#L5128

This feature both turns ringified scripts into a list of blocks, it also can turn a Lisp-y string into a list of blocks.


The "data" block (aka "length of _") in Snap can now turn blocks into text/lines.

Our "data" block:

Process.prototype.reportListAttribute = function (choice, list) {

Snap! "data" block with "lines" option: https://github.com/jmoenig/Snap/blob/5937085ed8c0837f82d7372d1eb938ae7fc07362/src/threads.js#L2258


The "join" block in Snap can now turn lists of blocks into scripts and Lisp-y text into blocks

Ours?:

Process.prototype.reportJoinWords = function (aList) {

In Snap: https://github.com/jmoenig/Snap/blob/5937085ed8c0837f82d7372d1eb938ae7fc07362/src/threads.js#L5015

@gsteinLTU
Copy link
Member Author

It may be helpful to do a diff on https://github.com/jmoenig/Snap/tree/dev and jmoenig@5937085

@gsteinLTU gsteinLTU linked a pull request Feb 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant