Skip to content

Commit

Permalink
Merge pull request #3 from 40ants/support-remove-command
Browse files Browse the repository at this point in the history
Support new Reblocks version where REMOVED argument was added to REBLOCKS/WIDGET:UPDATE generic-function.
  • Loading branch information
svetlyak40wt authored Dec 10, 2023
2 parents 329da3d + 939f453 commit 07e248a
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 7 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "RELEASE",
"on": {
"push": {
"branches": [
"master"
]
}
},
"jobs": {
"autotag": {
"runs-on": "ubuntu-latest",
"env": {
"OS": "ubuntu-latest"
},
"steps": [
{
"name": "Checkout Code",
"uses": "actions/checkout@v3"
},
{
"name": "Create release tag",
"uses": "butlerlogic/action-autotag@8bc1ad456dcdee34e8c6ffbce991cc31793578c2",
"with": {
"root": "ChangeLog.md",
"regex_pattern": "^## (?<version>\\d+\\.\\d+\\.\\d+.*?)( |\\n).*$",
"tag_prefix": "v"
},
"env": {
"GITHUB_TOKEN": "${{ secrets.DEPLOY_TRIGGER_TOKEN }}"
}
}
]
}
}
}
2 changes: 2 additions & 0 deletions docs/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"ASDF"
"REPL"
"HTTP"))
(0.5.0 2022-12-10
"* Support new Reblocks version where REMOVED argument was added to REBLOCKS/WIDGET:UPDATE generic-function.")
(0.4.0 2019-08-02
"* Library was fixed to work with latest `Woo`.")

Expand Down
3 changes: 2 additions & 1 deletion docs/index.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"TODO"
"Unlicense"
"REPL"
"GIT"))
"GIT")
:external-docs "https://40ants.com/reblocks/")
(reblocks-websocket system)
"
[![](https://github-actions.40ants.com/40ants/reblocks-websocket/matrix.svg?only=ci.run-tests)](https://github.com/40ants/reblocks-websocket/actions)
Expand Down
4 changes: 2 additions & 2 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-02-15"))
:version "2023-10-21"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org/" :%version :latest)
:version "20230603225002"))
:version "20231210065000"))
("slynk" .
(:class qlot/source/github:source-github
:initargs (:repos "svetlyak40wt/sly" :ref nil :branch "patches" :tag nil)
Expand Down
5 changes: 5 additions & 0 deletions src/ci.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
(in-package #:reblocks-websocket-ci/ci)


(defworkflow release
:on-push-to "master"
:jobs ((40ants-ci/jobs/autotag:autotag)))


(defworkflow linter
:on-push-to "master"
:by-cron "0 10 * * 1"
Expand Down
14 changes: 10 additions & 4 deletions src/websocket.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,14 @@ for each widget, because of symbols autogenerated by Parenscript.")
(defmethod reblocks/widget:update ((widget websocket-widget)
&key
inserted-after
inserted-before)
inserted-before
removed)
(cond
(*background*
(with-collected-dependencies
(let* ((rendered-widget (with-html-string
(reblocks/widget:render widget)))
(let* ((rendered-widget (unless removed
(with-html-string
(reblocks/widget:render widget))))
(collected-deps (get-collected-dependencies))
;; (widget-deps (reblocks/dependencies:get-dependencies widget))
(dom-id (alexandria:make-keyword
Expand All @@ -477,10 +479,14 @@ for each widget, because of symbols autogenerated by Parenscript.")

(cond
((and (null inserted-before)
(null inserted-after))
(null inserted-after)
(null removed))
(send-command :update-widget
:widget rendered-widget
:dom-id dom-id))
(removed
(send-command :remove-widget
:dom-id dom-id))
(inserted-before
(send-command :insert-widget
:widget rendered-widget
Expand Down

0 comments on commit 07e248a

Please sign in to comment.