Syntax similar to JSX
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, python, react
調査の方向性
Start by reading the linked tagstr transpiler issue and the example implementation in tagstr/examples/htmldom.py. Clarify whether the work targets the interim transpiler, the tag string PEP, or both, then define the html tag function's expected behavior from the JSX examples. Done means an agreed implementation path with working transpiler support and an html tag usable by the shown example.
索引モデルが issue の本文から書いたものです。
説明
Current Situation
ReactJS has a method of HTML templating called JSX. We currently do not have an equivalent. We should create a Python-based JSX equivalent that operates similarly to how it is used in ReactJS (Javascript).
The key difference here is we will not use a dedicated file extension (such as .psx) in order to not break existing toolchains. Instead, we will rely on the tag string PEP that adds template literals to Python. Here is an example of the tag string syntax:
from reactpy import html
button_style = {"font_style": "bold"}
button_text = "Click me!"
view = html(t"<button on_click={lambda event: ...} style={button_text}>{button_text}</button>")
While we wait for the tag string PEP to be merged, we could potentially use an interim transpiler to use a similar syntax. The interim transpiler syntax would look something like this:
from reactpy import html
button_style = {"font_style": "bold"}
button_text = "Click me!"
view = html @ f"<button on_click={lambda event: ...} style={button_text}>{button_text}</button>"
Proposed Actions
Aid in the development of this proposed transpiler and then develop an html tag function. An initial implementation of an html tag can be found here.
News: There is now a VSCode Extension to add syntax highlighting for inline HTML. (and a second one)
- 主要言語
- Python
- スター
- 8.1k
- フォーク
- 332
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reactive-python/reactpy のほかの issue
-
Outdated GIF in Docs オープンpriority-3-low type-docs
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
reactive-python/reactpy#1034 ·
-
priority-2-moderate type-revision
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
reactive-python/reactpy#1319 ·
-
priority-1-high
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
reactive-python/reactpy#1277 ·
-
priority-3-low
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
reactive-python/reactpy#1273 · リアクション 1 件 ·
-
priority-2-moderate
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
reactive-python/reactpy#1272 · リアクション 2 件 ·
reactive-python/reactpy の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100