mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Add htmx guidelines (#28993)
To make sure we don't abuse it. --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
		@@ -65,14 +65,17 @@ Recommended implementations:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* Vue + Vanilla JS
 | 
					* Vue + Vanilla JS
 | 
				
			||||||
* Fomantic-UI (jQuery)
 | 
					* Fomantic-UI (jQuery)
 | 
				
			||||||
 | 
					* htmx (partial page reloads for otherwise static components)
 | 
				
			||||||
* Vanilla JS
 | 
					* Vanilla JS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Discouraged implementations:
 | 
					Discouraged implementations:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Vue + Fomantic-UI (jQuery)
 | 
					* Vue + Fomantic-UI (jQuery)
 | 
				
			||||||
* jQuery + Vanilla JS
 | 
					* 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.
 | 
					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,
 | 
					Although mixing different frameworks is discouraged,
 | 
				
			||||||
it should also work if the mixing is necessary and the code is well-designed and maintainable.
 | 
					it should also work if the mixing is necessary and the code is well-designed and maintainable.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user