-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adopt lucuma-typed #351
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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))) |
There was a problem hiding this comment.
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. :(
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...