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

feat(gnodev): Add automatic page reload on save #1457

Merged
merged 19 commits into from
Feb 28, 2024

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Dec 18, 2023

Add automatic page reloading upon package save by injecting a WebSocket client into the gnoweb html page. This client connects to an events server to detect node reloads. With this feature enabled, gnoweb will automatically reload the page whenever the node reloads (in gnodev only).

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton marked this pull request as ready for review January 25, 2024 16:54
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Being nitpicky on code quality, the feature works great. Thanks, love this!

contribs/gnodev/pkg/events/events.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/events.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/static/hotreload.js Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/middleware.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/server.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/server.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/middleware.go Outdated Show resolved Hide resolved
contribs/gnodev/main.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/events.go Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton requested a review from thehowl February 21, 2024 12:27
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

Just minor change, after that LGTM

contribs/gnodev/pkg/dev/node.go Outdated Show resolved Hide resolved
@gfanton gfanton merged commit b189043 into gnolang:master Feb 28, 2024
9 checks passed
@gfanton gfanton deleted the feat/webapp-hotreload branch February 28, 2024 08:32
leohhhn pushed a commit to leohhhn/gno that referenced this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants