From 12a15dc13c33aba0d0ef646591cbf4b7634336d8 Mon Sep 17 00:00:00 2001 From: Adrian Salceanu <adrian.salceanu@gmail.com> Date: Wed, 6 Mar 2024 07:30:33 +0200 Subject: [PATCH 1/4] fix "Built with Genie" logo --- Project.toml | 2 +- src/ReactiveTools.jl | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index ae949d6d..f2b9c9d2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Stipple" uuid = "4acbeb90-81a0-11ea-1966-bdaff8155998" authors = ["Adrian <e@essenciary.com>"] -version = "0.28.00" +version = "0.28.5" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/ReactiveTools.jl b/src/ReactiveTools.jl index dead75aa..f8c73270 100644 --- a/src/ReactiveTools.jl +++ b/src/ReactiveTools.jl @@ -62,10 +62,14 @@ function DEFAULT_LAYOUT(; title::String = "Genie App", <% end %> <style> ._genie_logo { - background:url('https://genieframework.com/logos/genie/logo-simple-with-padding.svg') no-repeat;background-size:40px; - padding-top:22px;padding-right:10px;color:transparent;font-size:9pt; + background:url('https://genieframework.com/logos/genie/logo-simple-with-padding.svg') no-repeat; + background-size:40px; + padding-top:22px; + padding-right:10px; + color:transparent !important; + font-size:9pt; } - ._genie .row .col-12 { width:50%;margin:auto; } + ._genie .row .col-12 { width:50%; margin:auto; } </style> $(join(head_content, "\n ")) </head> @@ -339,12 +343,12 @@ macro debounce(fieldname, ms) end """ - @clear_debounce + @clear_debounce @clear_debounce fieldname - + @clear_debounce App - + @clear_debounce App fieldname Clear field-specific debounce time, for setting see `@debounce`. @@ -1145,7 +1149,7 @@ Registers a new page with source in `view` to be rendered at the route `url`. ```julia @page("/", "view.html") -@page("/", ui; model = MyApp) # for specifying an explicit app +@page("/", ui; model = MyApp) # for specifying an explicit app ``` """ macro page(expressions...) From 036b23eaa0e29fb759781f06e65044a771100446 Mon Sep 17 00:00:00 2001 From: Adrian Salceanu <essenciary@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:05:07 +0200 Subject: [PATCH 2/4] Add nightly, add 1 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 007c56c4..1bdb9357 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: matrix: version: - '1.6' - - '1.7' - - '1.10' + - '1' + - 'nightly' os: - ubuntu-latest - macOS-latest @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@latest with: - version: '1.7' + version: '1' - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy From db32e7a24f5d2bad9be325c2273bc652ce43ecd9 Mon Sep 17 00:00:00 2001 From: hhaensel <31985040+hhaensel@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:44:35 +0100 Subject: [PATCH 3/4] Fix linked sessions in multipage app (#266) * fix multipage apps * add tests for multipage app --- src/Pages.jl | 4 ++-- test/runtests.jl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/Pages.jl b/src/Pages.jl index 5e02f51d..4fcafb9a 100644 --- a/src/Pages.jl +++ b/src/Pages.jl @@ -42,9 +42,9 @@ function Page( route::Union{Route,String}; Core.eval(context, model) elseif isa(model, Module) context = model - @eval(context, Stipple.ReactiveTools.@init(debounce = $debounce, transport = $transport, core_theme = $core_theme)) + () -> @eval(context, Stipple.ReactiveTools.@init(debounce = $debounce, transport = $transport, core_theme = $core_theme)) elseif model isa DataType - @eval(context, Stipple.ReactiveTools.@init($model; debounce = $debounce, transport = $transport, core_theme = $core_theme)) + () -> @eval(context, Stipple.ReactiveTools.@init($model; debounce = $debounce, transport = $transport, core_theme = $core_theme)) else model end diff --git a/test/runtests.jl b/test/runtests.jl index 24dca9b8..1bcc984e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -180,6 +180,56 @@ end @test model.s3[] == "20" end +module App1 + +using Stipple, Stipple.ReactiveTools +@app begin + @in i1 = 101 +end + +@app MyApp begin + @in i1 = 101 +end + +end + +module App2 +using Stipple, Stipple.ReactiveTools + +@app begin + @in i2 = 102 +end + +@app MyApp begin + @in i2 = 102 +end + +end + +@testset "Multipage Reactive API (implicit)" begin + @eval p1 = @page("/app1", "hello", model = App1) + @eval p2 = @page("/app2", "world", model = App2) + channel1a = get_channel(String(p1.route.action().body)) + channel1b = get_channel(String(p1.route.action().body)) + channel2a = get_channel(String(p2.route.action().body)) + channel2b = get_channel(String(p2.route.action().body)) + + # channels have to be different + @test channel1a != channel1b != channel2a != channel2b +end + +@testset "Multipage Reactive API (explicit)" begin + @eval p1 = @page("/app1", "hello", model = App1.MyApp) + @eval p2 = @page("/app2", "world", model = App2.MyApp) + channel1a = get_channel(String(p1.route.action().body)) + channel1b = get_channel(String(p1.route.action().body)) + channel2a = get_channel(String(p2.route.action().body)) + channel2b = get_channel(String(p2.route.action().body)) + + # channels have to be different + @test channel1a != channel1b != channel2a != channel2b +end + using DataFrames @testset "Extensions" begin d = Dict(:a => [1, 2, 3], :b => ["a", "b", "c"]) From 90615d87a0d4aa547f2da0f73fccdd740094293b Mon Sep 17 00:00:00 2001 From: hhaensel <31985040+hhaensel@users.noreply.github.com> Date: Thu, 14 Mar 2024 00:01:05 +0100 Subject: [PATCH 4/4] allow for failing nightlies (#267) --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bdb9357..c0808dc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + continue-on-error: ${{ matrix.version == 'nightly'}} runs-on: ${{ matrix.os }} strategy: fail-fast: false