urbit / tree

The web interface for your urbit.
13 stars 7 forks source link

REPL Component #37

Closed mattlevan closed 4 years ago

mattlevan commented 6 years ago

Implemented a self-contained REPL component so users can render multiple on the same page. This will be used for the Loon (Learn Hoon) course.

Illustration: image

Corresponding Sail:

;repl;
;repl(value "|1:[42 43 44]");
;repl(solution "45", value "[42 43 44 45]");

@ohAitch how can we insert multiple line default values?

Could be later extended to support:

This component is far from pure, I think, and I don't know React hardly at all, so let me know if I should go back and implement this in a more functional style.

Also, I know Tree will be (is?) undergoing some heavy refactoring by Isaac and others. I'm sure I had his GitHub username around here somewhere... I'd appreciate a link to his account.

ohAitch commented 6 years ago

\0a is the hoon escape for \n

On Thursday, 21 December 2017, Matthew Levan notifications@github.com wrote:

Implemented a self-contained REPL component so users can render multiple on the same page. This will be used for the Loon (Learn Hoon) https://github.com/mattlevan/loon course.

Illustration: [image: image] https://user-images.githubusercontent.com/4582375/34280300-b402fab8-e66b-11e7-886f-76bbcf2095c6.png

Corresponding Sail:

;repl; ;repl(value "|1:[42 43 44]"); ;repl(solution "45", value "[42 43 44 45]");

@ohAitch https://github.com/ohaitch how can we insert multiple line default values?

Could be later extended to support:

This component is far from pure, I think, and I don't know React hardly at all, so let me know if I should go back and implement this in a more functional style.

Also, I know Tree will be (is?) undergoing some heavy refactoring by Isaac and others. I'm sure I had his GitHub username around here somewhere... I'd appreciate a link to his account.

You can view, comment on, or merge this pull request online at:

https://github.com/urbit/tree/pull/37 Commit Summary

  • repl component
  • Handle value/solution props

File Changes

Patch Links:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/urbit/tree/pull/37, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxXhrVB5UrRE03OvxMfFjMsO-sC8V6Yks5tCvjqgaJpZM4RKhDJ .