Skip to content

Commit

Permalink
Merge pull request #309 from HapticX/dev
Browse files Browse the repository at this point in the history
Release v4.3.0
  • Loading branch information
Ethosa authored Jul 9, 2024
2 parents 5028dca + d3886e5 commit 451cc12
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 204 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/language_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ on:
push:
branches:
- 'master'
paths:
- '**/language_bindings.yml'
- '**/bindings/**'
- '**/constants.nim'
pull_request:
- 'dev'
paths:
- '**/language_bindings.yml'
- '**/bindings/**'
Expand Down Expand Up @@ -95,6 +91,7 @@ jobs:
# TODO:
# account recovery
- name: Publish Python package 📢
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@8cdc2ab67c943c5edf5fd9ae1995546b4b550602
with:
user: __token__
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ jobs:
run: |
nimble refresh
nimble install -y -d
nimble install checksums -y
nimble install regex -y
- uses: reviewdog/action-nimlint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.
src: 'src/*.nim'
async_http_server:
name: Test C via AsyncHttpServer 🧪
needs: dependencies
Expand Down
14 changes: 14 additions & 0 deletions examples/website/src/docs/reactivity.nim
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ proc Reactivity*(): TagRef =

CodeBlock("nim", nimSpaReactivity1, "nim_spa_reactivity_1")

tP: {translate"In the diagram below, you can see how state changes occur."}

tImg(src = "/happyx/public/HappyXReactivity.svg", alt = "HappyX Reactivity", class = "self-center rounded-xl")

tP:
{translate"As you can see in the above code example, a special syntax is used to call the "}
tCode: "inc()"
Expand Down Expand Up @@ -110,3 +114,13 @@ proc Reactivity*(): TagRef =
{translate" in one go."}

CodeBlock("nim", nimSpaReactivity5, "nim_spa_reactivity_5")

tH2:
{translate"Watchers"}

tP:
{translate"Reactivity in HappyX allows you to attach so-called watchers to reactive variables."}
" "
{translate"This allows you to work with the past and new values of the reactive variable."}

CodeBlock("nim", nimReactivityWatchers, "nim_spa_watchers")
19 changes: 19 additions & 0 deletions examples/website/src/happyx/public/HappyXReactivity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions examples/website/src/ui/code/nim_ssr.nim
Original file line number Diff line number Diff line change
Expand Up @@ -578,4 +578,19 @@ liveview:
serve "127.0.0.1", 5000:
discard
"""
nimReactivityWatchers* = """import happyx
var counter = remember 0
counter.watch(old, new):
echo "set counter to ", new, ", but before it be ", old
appRoutes "app":
"/":
{counter}
tButton:
"increase"
@click:
counter += 1
"""
24 changes: 24 additions & 0 deletions examples/website/src/ui/translations.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,30 @@ translatable:
"zh" -> "重要的是要注意,实时视图允许您使用单页应用程序的反应性。"
"fr" -> "Il est important de noter que les liveviews vous permettent d'utiliser la réactivité des applications monopages."
"ko" -> "라이브뷰는 단일 페이지 애플리케이션의 반응성을 사용할 수 있도록 해준다는 점을 유의하십시오."
"In the diagram below, you can see how state changes occur.":
"ru" -> "На диаграмме ниже вы можете видеть, как происходит изменение состояния."
"ja" -> "下の図では、状態の変化がどのように起こるかを確認できます。"
"zh" -> "在下面的图表中,您可以看到状态是如何变化的。"
"fr" -> "Dans le diagramme ci-dessous, vous pouvez voir comment les changements d'état se produisent."
"ko" -> "아래 다이어그램에서 상태 변경이 어떻게 발생하는지 볼 수 있습니다."
"Watchers":
"ru" -> "Watchers"
"ja" -> "ウォッチャー"
"zh" -> "监视器"
"fr" -> "Observateurs"
"ko" -> "워처"
"Reactivity in HappyX allows you to attach so-called watchers to reactive variables.":
"ru" -> "Реактивность в HappyX позволяет вешать так называемые watcher'ы на реактивные переменные."
"ja" -> "HappyXのリアクティビティでは、リアクティブ変数にウォッチャーを付けることができます。"
"zh" -> "HappyX中的反应性允许您将所谓的监视器附加到反应变量上。"
"fr" -> "La réactivité dans HappyX vous permet d'attacher des observateurs aux variables réactives."
"ko" -> "HappyX의 반응성은 반응형 변수에 소위 워처를 부착할 수 있게 해줍니다."
"This allows you to work with the past and new values of the reactive variable.":
"ru" -> "Это позволяет работать с прошлым и новым значением реактивной переменной."
"ja" -> "これにより、リアクティブ変数の過去と新しい値を操作することができます。"
"zh" -> "这允许您使用反应变量的过去值和新值。"
"fr" -> "Cela vous permet de travailler avec les anciennes et nouvelles valeurs de la variable réactive."
"ko" -> "이를 통해 반응형 변수의 과거 값과 새로운 값을 작업할 수 있습니다."


var spokenLang: cstring
Expand Down
2 changes: 1 addition & 1 deletion happyx.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

description = "Macro-oriented asynchronous web-framework written with ♥"
author = "HapticX"
version = "4.2.1"
version = "4.3.0"
license = "MIT"
srcDir = "src"
installExt = @["nim"]
Expand Down
4 changes: 2 additions & 2 deletions src/happyx/core/constants.nim
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const
nim_2_0_0* = (NimMajor, NimMinor, NimPatch) >= (2, 0, 0)
# Framework version
HpxMajor* = 4
HpxMinor* = 2
HpxPatch* = 1
HpxMinor* = 3
HpxPatch* = 0
HpxVersion* = $HpxMajor & "." & $HpxMinor & "." & $HpxPatch


Expand Down
Loading

0 comments on commit 451cc12

Please sign in to comment.