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

Towards Calico 0.2 #107

Merged
merged 37 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2d4e882
Begin redesign effort
armanbilge Nov 3, 2022
3521559
Remove deprecatia
armanbilge Nov 3, 2022
5586ae2
Add internal syntax helpers
armanbilge Nov 3, 2022
b6c2a61
More wip refactoring
armanbilge Nov 3, 2022
2af932a
Progress on modifiers
armanbilge Nov 3, 2022
b6b7fae
Work on attrs and props
armanbilge Nov 3, 2022
1143e05
Optimize `ClassProp`
armanbilge Nov 3, 2022
5496a46
Work on `Children`
armanbilge Nov 4, 2022
57a440f
Unique names for `given`s
armanbilge Nov 4, 2022
e9a1d84
Work on `EventProp`
armanbilge Nov 4, 2022
48dc0a1
wip keyed children
armanbilge Nov 4, 2022
ef39b39
Work on `KeyedChildren`
armanbilge Nov 4, 2022
32f9071
This has been bothering me forever
armanbilge Nov 4, 2022
4995e27
Rename dsl -> html
armanbilge Nov 4, 2022
1381b31
Fixing up TodoMVC
armanbilge Nov 4, 2022
c777890
Scala 3.2.1 to the rescue!
armanbilge Nov 4, 2022
15d3afa
Bug fixes
armanbilge Nov 4, 2022
0baef00
Bump fs2
armanbilge Nov 4, 2022
6658b40
Performance optimization sadness
armanbilge Nov 5, 2022
f0168ec
Optimize away allocations
armanbilge Nov 5, 2022
9cd9c01
Use broadly-supported API
armanbilge Nov 5, 2022
c6acd5d
Experiment with `BatchingMacrotaskExecutor`
armanbilge Nov 5, 2022
d95257d
Adopt fs2.dom DOM wrappers
armanbilge Nov 12, 2022
defb971
TodoMVC compiling
armanbilge Nov 12, 2022
86d9520
Bug fix
armanbilge Nov 12, 2022
10406e6
No more `mapToTargetValue`
armanbilge Nov 12, 2022
692931f
Use `Location` for router
armanbilge Nov 12, 2022
b48b30c
Fix TodoMvc
armanbilge Nov 12, 2022
310b68a
Delete widget project
armanbilge Nov 12, 2022
473be2c
Regenerate workflow
armanbilge Nov 12, 2022
1e172e8
Wip fixing docs
armanbilge Nov 12, 2022
671ff27
Doc fix
armanbilge Nov 12, 2022
81a7c72
Merge branch 'main' into pr/0.2-redesign
armanbilge Jan 4, 2023
c9bee0f
scalafmt
armanbilge Jan 4, 2023
04b5521
Get docs building
armanbilge Jan 4, 2023
4ce8bea
Merge branch 'main' into pr/0.2-redesign
armanbilge Jan 4, 2023
433476a
Clear out example
armanbilge Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/0.1')
run: mkdir -p frp/.js/target todo-mvc/target target unidocs/target .js/target site/target widget/target jsdocs/target .jvm/target .native/target example/target frp/.jvm/target router/target calico/target project/target
run: mkdir -p frp/.js/target todo-mvc/target target unidocs/target .js/target site/target jsdocs/target .jvm/target .native/target example/target frp/.jvm/target router/target calico/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/0.1')
run: tar cf targets.tar frp/.js/target todo-mvc/target target unidocs/target .js/target site/target widget/target jsdocs/target .jvm/target .native/target example/target frp/.jvm/target router/target calico/target project/target
run: tar cf targets.tar frp/.js/target todo-mvc/target target unidocs/target .js/target site/target jsdocs/target .jvm/target .native/target example/target frp/.jvm/target router/target calico/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/series/0.1')
Expand Down
18 changes: 6 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ ThisBuild / scalacOptions ++= Seq("-new-syntax", "-indent", "-source:future")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / tlJdkRelease := Some(8)

ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots")

val CatsVersion = "2.9.0"
val CatsEffectVersion = "3.4.4"
val Fs2Version = "3.4.0"
val Fs2DomVersion = "0.1.0"
val Fs2DomVersion = "0.1-d92ea1c-SNAPSHOT"
val MonocleVersion = "3.2.0"

lazy val root =
tlCrossRootProject.aggregate(frp, calico, router, widget, example, todoMvc, unidocs)
tlCrossRootProject.aggregate(frp, calico, router, example, todoMvc, unidocs)

lazy val frp = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Pure)
Expand Down Expand Up @@ -70,18 +72,10 @@ lazy val router = project
)
)

lazy val widget = project
.in(file("widget"))
.enablePlugins(ScalaJSPlugin)
.settings(
name := "calico-widget"
)
.dependsOn(calico)

lazy val example = project
.in(file("example"))
.enablePlugins(ScalaJSPlugin, NoPublishPlugin)
.dependsOn(calico, widget, router)
.dependsOn(calico, router)
.settings(
scalaJSUseMainModuleInitializer := true,
Compile / fastLinkJS / scalaJSLinkerConfig ~= {
Expand Down Expand Up @@ -128,7 +122,7 @@ lazy val unidocs = project
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(frp.js, calico, router)
)

lazy val jsdocs = project.dependsOn(calico, router, widget).enablePlugins(ScalaJSPlugin)
lazy val jsdocs = project.dependsOn(calico, router).enablePlugins(ScalaJSPlugin)
lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
Expand Down
8 changes: 4 additions & 4 deletions calico/src/main/scala/calico/IOWebApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ trait IOWebApp:

def rootElementId: String = "app"

def render: Resource[IO, dom.HTMLElement]
def render: Resource[IO, fs2.dom.HtmlElement[IO]]

def main(args: Array[String]): Unit =
IO.delay(Option(dom.document.getElementById(rootElementId)).get)
.flatMap { e => render.renderInto(e).useForever }
.unsafeRunAndForget()
val document = fs2.dom.Document[IO]
val rootElement = document.getElementById(rootElementId).map(_.get)
rootElement.flatMap(render.renderInto(_).useForever).unsafeRunAndForget()
Loading