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

update finalizer #921

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
68c3227
Condition Rework (#887)
maxence-charriere Sep 19, 2023
48e43ab
Broader use of formatted string arg and generated documentation overh…
maxence-charriere Sep 20, 2023
d30c8bf
Routes refactoring (#889)
maxence-charriere Sep 22, 2023
326e537
Improve filter UI elems (#891)
maxence-charriere Sep 28, 2023
df458a7
remove isServerSide from engine and dispatcher (#892)
maxence-charriere Sep 28, 2023
234dbd3
remove node kind (#893)
maxence-charriere Sep 28, 2023
0b57931
remove internal node context (#894)
maxence-charriere Sep 30, 2023
9340c1f
Node manager (#903)
maxence-charriere Nov 9, 2023
88b5f15
cleanup persisted states (#904)
maxence-charriere Nov 10, 2023
4eeb845
fix broadcast state
maxence-charriere Nov 11, 2023
8e43917
fix engine request page
maxence-charriere Nov 13, 2023
5225723
js args adjustment (#907)
maxence-charriere Nov 17, 2023
d4dfb8e
Url resolver (#911)
maxence-charriere Dec 1, 2023
d42a900
set keywords only when they are set
maxence-charriere Dec 19, 2023
0168c8c
html to no display empty title property
maxence-charriere Dec 19, 2023
d2ee13f
Http resource (#913)
maxence-charriere Jan 12, 2024
bffd2dc
Fix prevent update (#916)
maxence-charriere Jan 13, 2024
3d8a5e6
Create js_wasm_test.go
maxence-charriere Jan 15, 2024
4b614f9
add context.Update
maxence-charriere Jan 15, 2024
8256c2c
Update http.go
maxence-charriere Jan 15, 2024
200b16d
trigger on update whenever a component is updated (#917)
maxence-charriere Jan 15, 2024
424c7c1
Trigger on update whenever a component is updated (#918)
maxence-charriere Jan 15, 2024
403bcdf
Revert "Trigger on update whenever a component is updated (#918)"
maxence-charriere Jan 17, 2024
1bbf4b6
Revert "trigger on update whenever a component is updated (#917)"
maxence-charriere Jan 17, 2024
9e1653a
call clean args into Invoke
maxence-charriere Jan 17, 2024
2393cd8
fixe cleanArgs with []any
maxence-charriere Jan 17, 2024
0e3d458
refactor js wrapping (#920)
maxence-charriere Jan 31, 2024
c59b3f3
update finalizer
maxence-charriere Jan 31, 2024
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
21 changes: 16 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Vet
run: go vet ./...
run: |
go vet ./pkg/app
go vet ./pkg/errors
go vet ./pkg/logs
go vet ./pkg/cache
go vet ./pkg/cli

server:
name: Unit Tests
Expand All @@ -23,11 +28,15 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Run Unit Tests
run: go test -race ./...
run: |
go test -race ./pkg/app
go test -race ./pkg/errors
go test -race ./pkg/logs
go test -race ./pkg/cache

client:
name: WebAssembly Unit Tests
Expand All @@ -36,7 +45,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Install WASM Browser Test
Expand All @@ -46,3 +55,5 @@ jobs:
- name: Run Unit Tests
run: |
GOARCH=wasm GOOS=js go test ./pkg/app
GOARCH=wasm GOOS=js go test ./pkg/errors
GOARCH=wasm GOOS=js go test ./pkg/logs
4 changes: 0 additions & 4 deletions docs/src/actions-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newActionPage() *actionPage {
return &actionPage{}
}

func (p *actionPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *actionPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/architecture-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newArchitecturePage() *architecturePage {
return &architecturePage{}
}

func (p *architecturePage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *architecturePage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/components-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newComponentsPage() *componentsPage {
return &componentsPage{}
}

func (p *componentsPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *componentsPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/concurrency-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newConcurrencyPage() *concurrencyPage {
return &concurrencyPage{}
}

func (p *concurrencyPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *concurrencyPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/declarative-syntax-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newDeclarativeSyntaxPage() *declarativeSyntaxPage {
return &declarativeSyntaxPage{}
}

func (p *declarativeSyntaxPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *declarativeSyntaxPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/getting-started-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newGettingStartedPage() *gettingStartedPage {
return &gettingStartedPage{}
}

func (p *gettingStartedPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *gettingStartedPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/github-deploy-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newGithubDeployPage() *githubDeployPage {
return &githubDeployPage{}
}

func (p *githubDeployPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *githubDeployPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/home-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ func newHomePage() *homePage {
return &homePage{}
}

func (p *homePage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *homePage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/install-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newInstallPage() *installPage {
return &installPage{}
}

func (p *installPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *installPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/js-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newJSPage() *jsPage {
return &jsPage{}
}

func (p *jsPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *jsPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/lifecycle-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newLifecyclePage() *lifecyclePage {
return &lifecyclePage{}
}

func (p *lifecyclePage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *lifecyclePage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
46 changes: 23 additions & 23 deletions docs/src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,29 @@ func main() {
ui.BlockPadding = 18
analytics.Add(analytics.NewGoogleAnalytics())

app.Route("/", newHomePage())
app.Route("/getting-started", newGettingStartedPage())
app.Route("/architecture", newArchitecturePage())
app.Route("/reference", newReferencePage())

app.Route("/components", newComponentsPage())
app.Route("/declarative-syntax", newDeclarativeSyntaxPage())
app.Route("/routing", newRoutingPage())
app.Route("/static-resources", newStaticResourcePage())
app.Route("/js", newJSPage())
app.Route("/concurrency", newConcurrencyPage())
app.Route("/seo", newSEOPage())
app.Route("/lifecycle", newLifecyclePage())
app.Route("/install", newInstallPage())
app.Route("/testing", newTestingPage())
app.Route("/actions", newActionPage())
app.Route("/states", newStatesPage())
app.Route("/notifications", newNotificationsPage())

app.Route("/migrate", newMigratePage())
app.Route("/github-deploy", newGithubDeployPage())

app.Route("/privacy-policy", newPrivacyPolicyPage())
app.Route("/", app.NewZeroComponentFactory(newHomePage()))
app.Route("/getting-started", app.NewZeroComponentFactory(newGettingStartedPage()))
app.Route("/architecture", app.NewZeroComponentFactory(newArchitecturePage()))
app.Route("/reference", app.NewZeroComponentFactory(newReferencePage()))

app.Route("/components", app.NewZeroComponentFactory(newComponentsPage()))
app.Route("/declarative-syntax", app.NewZeroComponentFactory(newDeclarativeSyntaxPage()))
app.Route("/routing", app.NewZeroComponentFactory(newRoutingPage()))
app.Route("/static-resources", app.NewZeroComponentFactory(newStaticResourcePage()))
app.Route("/js", app.NewZeroComponentFactory(newJSPage()))
app.Route("/concurrency", app.NewZeroComponentFactory(newConcurrencyPage()))
app.Route("/seo", app.NewZeroComponentFactory(newSEOPage()))
app.Route("/lifecycle", app.NewZeroComponentFactory(newLifecyclePage()))
app.Route("/install", app.NewZeroComponentFactory(newInstallPage()))
app.Route("/testing", app.NewZeroComponentFactory(newTestingPage()))
app.Route("/actions", app.NewZeroComponentFactory(newActionPage()))
app.Route("/states", app.NewZeroComponentFactory(newStatesPage()))
app.Route("/notifications", app.NewZeroComponentFactory(newNotificationsPage()))

app.Route("/migrate", app.NewZeroComponentFactory(newMigratePage()))
app.Route("/github-deploy", app.NewZeroComponentFactory(newGithubDeployPage()))

app.Route("/privacy-policy", app.NewZeroComponentFactory(newPrivacyPolicyPage()))

app.Handle(installApp, handleAppInstall)
app.Handle(updateApp, handleAppUpdate)
Expand Down
17 changes: 6 additions & 11 deletions docs/src/markdown-doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ func (d *remoteMarkdownDoc) Src(v string) *remoteMarkdownDoc {
return d
}

func (d *remoteMarkdownDoc) OnPreRender(ctx app.Context) {
d.load(ctx)
}

func (d *remoteMarkdownDoc) OnMount(ctx app.Context) {
d.load(ctx)
}
Expand All @@ -107,14 +103,13 @@ func (d *remoteMarkdownDoc) OnUpdate(ctx app.Context) {

func (d *remoteMarkdownDoc) load(ctx app.Context) {
src := d.Isrc
ctx.ObserveState(markdownState(src)).
ctx.ObserveState(markdownState(src), &d.md).
While(func() bool {
return src == d.Isrc
}).
OnChange(func() {
ctx.Defer(scrollTo)
}).
Value(&d.md)
})

ctx.NewAction(getMarkdown, app.T("path", d.Isrc))
}
Expand All @@ -130,10 +125,10 @@ func (d *remoteMarkdownDoc) Render() app.UI {
Loading(d.md.Status == loading).
Err(d.md.Err).
Label(fmt.Sprintf("Loading %s...", filepath.Base(d.Isrc))),
app.If(d.md.Status == loaded,
newMarkdownDoc().
app.If(d.md.Status == loaded, func() app.UI {
return newMarkdownDoc().
Class("fill").
MD(d.md.Data),
).Else(),
MD(d.md.Data)
}),
)
}
8 changes: 4 additions & 4 deletions docs/src/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ func (m *menu) Render() app.UI {

app.Div().Class("separator"),

app.If(m.appInstallable,
ui.Link().
app.If(m.appInstallable, func() app.UI {
return ui.Link().
Class(linkClass).
Icon(downloadSVG).
Label("Install").
OnClick(m.installApp),
),
OnClick(m.installApp)
}),
ui.Link().
Class(linkClass).
Icon(userLockSVG).
Expand Down
4 changes: 0 additions & 4 deletions docs/src/migrate-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newMigratePage() *migratePage {
return &migratePage{}
}

func (p *migratePage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *migratePage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
4 changes: 0 additions & 4 deletions docs/src/notifications-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ func newNotificationsPage() *notificationsPage {
return &notificationsPage{}
}

func (p *notificationsPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *notificationsPage) OnMount(ctx app.Context) {
p.notificationPermission = ctx.Notifications().Permission()
p.registerSubscription(ctx)
Expand Down
16 changes: 8 additions & 8 deletions docs/src/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func (p *page) Render() app.UI {
newMenu().Class("fill"),
).
Index(
app.If(len(p.Iindex) != 0,
ui.Scroll().
app.If(len(p.Iindex) != 0, func() app.UI {
return ui.Scroll().
Class("fill").
HeaderHeight(headerHeight).
Content(
Expand All @@ -90,8 +90,8 @@ func (p *page) Render() app.UI {
newIndexLink().Title("Report an Issue"),
app.Div().Class("separator"),
),
),
),
)
}),
).
Content(
ui.Scroll().
Expand All @@ -105,8 +105,8 @@ func (p *page) Render() app.UI {
Right().
Middle().
Content(
app.If(p.updateAvailable,
app.Div().
app.If(p.updateAvailable, func() app.UI {
return app.Div().
Class("link-update").
Body(
ui.Link().
Expand All @@ -117,8 +117,8 @@ func (p *page) Render() app.UI {
Icon(downloadSVG).
Label("Update").
OnClick(p.updateApp),
),
),
)
}),
),
),
).
Expand Down
4 changes: 0 additions & 4 deletions docs/src/privacy-policy-page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ func newPrivacyPolicyPage() *privacyPolicyPage {
return &privacyPolicyPage{}
}

func (p *privacyPolicyPage) OnPreRender(ctx app.Context) {
p.initPage(ctx)
}

func (p *privacyPolicyPage) OnNav(ctx app.Context) {
p.initPage(ctx)
}
Expand Down
Loading
Loading