Commit Graph

6 Commits

Author SHA1 Message Date
google-labs-jules[bot]
cbbb2f4073 perf: optimize tag badge generation in ui_helpers.js
Replaced redundant Array traversal (map().join('')) with a for...of loop
to construct the tagsHtml string. This avoids allocating a new array
for each item being rendered, reducing memory pressure and improving
rendering performance for menus with many tags.

Benchmark results (100,000 iterations):
- 0 tags: 13.3ms -> 4.0ms (~70% improvement)
- 1 tag: 60.9ms -> 46.7ms (~23% improvement)
- 10 tags: 489ms -> 411ms (~16% improvement)
- 50 tags: 2286ms -> 1942ms (~15% improvement)

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 12:51:57 +00:00
google-labs-jules[bot]
2f08a951b4 Refactor kantine.js into modular ES6 structure
Moved `kantine.js` into a `src/` directory with multiple modularized files:
- `api.js`: All API calls and constants
- `state.js`: State management (auth, cache, theme, tags, etc.)
- `utils.js`: Helpers for UI and Date formatting
- `ui.js`: DOM manipulation logic
- `events.js`: Initial DOM event listeners and logic hooks
- `actions.js`: Data fetching actions, local processing logic
- `ui_helpers.js`: UI helper functions (rendering modals, handling DOM injections)

Updated the `build-bookmarklet.sh` to compile with Webpack via newly created `webpack.config.js`. Updated all relevant test scripts to use the new output `dist/kantine.bundle.js` and modified logic to work within Webpack scopes.

Co-authored-by: TauNeutrino <1600410+TauNeutrino@users.noreply.github.com>
2026-03-10 11:55:36 +00:00
Kantine Wrapper
8b15760463 feat: Introduce language filter with DE/EN/ALL toggle for menu descriptions and update to version 1.6.0. 2026-03-04 13:11:34 +01:00
Kantine Wrapper
b1763135aa test(ui): massively expand DOM testing suite to cover all Modals and Actions (v1.4.18) 2026-02-24 20:50:19 +01:00
Kantine Wrapper
c2e3282131 fix(ui): restore highlight modal toggle event & add dom test suite (v1.4.17) 2026-02-24 20:40:54 +01:00
Kantine Wrapper
d895a5fb7c feat: immediate api refresh on flag, fix timestamp fallback (v1.4.14) 2026-02-24 15:31:48 +01:00