Skip to content

Commit

Permalink
Add htmx guidelines (#28993)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people authored Jan 31, 2024
1 parent 3b50dd9 commit 4989ad0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/content/contributing/guidelines-frontend.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ Recommended implementations:

* Vue + Vanilla JS
* Fomantic-UI (jQuery)
* htmx (partial page reloads for otherwise static components)
* Vanilla JS

Discouraged implementations:

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

To make UI consistent, Vue components can use Fomantic-UI CSS classes.
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).
Although mixing different frameworks is discouraged,
it should also work if the mixing is necessary and the code is well-designed and maintainable.

Expand Down

0 comments on commit 4989ad0

Please sign in to comment.