Skip to content

Miscellaneous WIP and/or hacky tree styling changes#980

Closed
georgefst wants to merge 9 commits intomainfrom
georgefst/zurihac
Closed

Miscellaneous WIP and/or hacky tree styling changes#980
georgefst wants to merge 9 commits intomainfrom
georgefst/zurihac

Conversation

@georgefst
Copy link
Contributor

image

Apologies for the mess - review the behaviour and not the code!

Tidies up some of our more egregious visual issues with trees. Cherry-picks stuff from #932 and an older version of #863 which I used for a demo to the team around two months ago.

I intend to run the Zurihac demo from this branch, unless any of these changes are really controversial.

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
Signed-off-by: George Thomas <georgefsthomas@gmail.com>
well, almost all - we still use black for Ann due to running out of good colours in our palette

we try to colour type nodes analogously to corresponding term nodes - this makes more sense now that we use different shapes for terms and types

this probably requires a little more thought e.g. we style term Lam and type LAM differently, choosing instead to highlight their analogies with TFun and TForall directly

also, I personally think "blue-secondary" looks quite odd on the canvas, but it's fine for now since it's used for advanced features (polymorphism)

we should also consider refactors to make this sort of change less laborious, though it's hard to say how to abstract colours properly when tailwind discourages concatenating class strings

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
we should do something better for non-empty holes really, but this still seems an improvement - the braces were a weird holdover from vonnegut text mode

this is a little broken in beginner mode

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
this causes some redundancy in beginner mode

a better solution is to separate the text used in expert mode from the label text used in expert mode - even though they will usually be the same, there are cases like this where they shouldn't be - this may also solve the hole rendering issue from the previous commit

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
we were already using `@` for two different concepts, so we may as well unify all three - we can now easily tell which sort of application is in use by the shape of children

`$` is a weird Haskell-ism that isn't really used elsewhere

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
This reverts commit b3cfbe9.

the wording was actually truncated - let's revisit this when we have dynamically-sizable nodes

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
Signed-off-by: George Thomas <georgefsthomas@gmail.com>
these seem redundant, since patterns already look so different to everthing else

we may wish to re-introduce these in beginner mode

Signed-off-by: George Thomas <georgefsthomas@gmail.com>
case "TLet":
return "let";
case "Pattern":
return "P";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just playing with replacing this with "Pattern" — might as well be explicit about it at beginner level, and we have the space. I agree it could be dropped altogether at higher levels.

@dhess
Copy link
Member

dhess commented Jun 11, 2023

I like most of these changes, FYI.

@dhess
Copy link
Member

dhess commented Jun 11, 2023

I have rebased most of these on current main in #987. I think it looks really nice! (I think the term definition nodes are too pill-shaped, but that's a minor point and obviously pure preference, with no objective basis.)

I did skip the hole styling in this PR because I'm pretty happy with current main's hole styling, with a few minor quibbles.

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.

2 participants