Skip to content

Commit 4989ad0

Browse files
yardenshohamwxiaoguangdelvh
authored
Add htmx guidelines (#28993)
To make sure we don't abuse it. --------- Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: delvh <[email protected]>
1 parent 3b50dd9 commit 4989ad0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/content/contributing/guidelines-frontend.en-us.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,17 @@ Recommended implementations:
6565

6666
* Vue + Vanilla JS
6767
* Fomantic-UI (jQuery)
68+
* htmx (partial page reloads for otherwise static components)
6869
* Vanilla JS
6970

7071
Discouraged implementations:
7172

7273
* Vue + Fomantic-UI (jQuery)
7374
* jQuery + Vanilla JS
75+
* htmx + any other framework which requires heavy JS code, or unnecessary features like htmx scripting (`hx-on`)
7476

7577
To make UI consistent, Vue components can use Fomantic-UI CSS classes.
78+
We use htmx for simple interactions. You can see an example for simple interactions where htmx should be used in this [PR](https://github.com/go-gitea/gitea/pull/28908). Do not use htmx if you require more advanced reactivity, use another framework (Vue/Vanilla JS).
7679
Although mixing different frameworks is discouraged,
7780
it should also work if the mixing is necessary and the code is well-designed and maintainable.
7881

0 commit comments

Comments
 (0)