mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-25 15:55:18 +02:00
Adds `web_src/js/utils/func.ts` with `debounce` and `throttle`, dropping
`throttle-debounce` and `perfect-debounce` dependencies. Both were
needed before: the former has no promise-returning debounce, which
`TextExpander` requires, and the latter no `throttle`.
Signature follows lodash and es-toolkit: `(func, wait, {leading,
trailing})` plus `cancel`, so argument order flips at the migrated call
sites.
Web Components
This webcomponents directory contains the source code for the web components used in the Gitea Web UI.
https://developer.mozilla.org/en-US/docs/Web/Web_Components
Guidelines
- These components are loaded in
<head>(before DOM body) in a separate entry point, they need to be lightweight to not affect the page loading time too much. - Do not import
svg.jsinto a web component because that file is currently not tree-shakeable, import svg files individually insteat. - All our components must be added to
vite.config.tsso they work correctly in Vue.