Skip to content

Adopt lucuma-typed #351

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

Merged
merged 15 commits into from
Feb 7, 2023
Merged

Adopt lucuma-typed #351

merged 15 commits into from
Feb 7, 2023

Conversation

armanbilge
Copy link
Collaborator

This moves all the ST generation to the new lucuma-typed repo.

https://github.com/gemini-hlsw/lucuma-typed

The advantage of this is that the facades are now effectively cached artifacts, so working in this repo should be more pleasant. Also, they now share common facades (e.g. std, react), instead of re-generating them for each "leaf" in the dependency tree.

Unfortunately I got entangled in some ST/JS facade updates in this PR, so the diff is a lot...

Copy link
Contributor

@toddburnside toddburnside left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for taking this on. Sorry it was such a learning experience. 😄

@@ -31,6 +31,10 @@ case class AccordionMultiple(
def withMods(mods: TagMod*) = addModifiers(mods)

override val rawActiveIndex = activeIndices.map(_.map(_.toDouble).toJSArray)
override val rawOnTabChange =
onTabChange.map(
_.compose[Double | js.Array[Double]](_.asInstanceOf[js.Array[Int]].toList)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did I know you could just asInstanceOf an Array[Double] to an Array[Int]? If not, I should remember it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Saves a .map 😁

@@ -48,7 +48,7 @@ object RadioButton {
.applyOrNot(props.tooltipOptions, (c, p) => c.tooltipOptions(p.asInstanceOf[CTooltipOptions]))
.applyOrNot(
props.onChange,
(c, p) => c.onChange(scp => p(props.valueFinder(scp.value), scp.checked))
(c, p) => c.onChange(scp => p(props.valueFinder(scp.value), scp.checked.getOrElse(false)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow. They seem to have suddenly decided that a lot of things are optional. :(

@armanbilge armanbilge marked this pull request as ready for review February 7, 2023 20:38
@armanbilge armanbilge merged commit 6107e07 into main Feb 7, 2023
@armanbilge armanbilge deleted the pr/lucuma-typed branch February 7, 2023 20:49
@armanbilge armanbilge mentioned this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants