Commit Graph

21 Commits

Author SHA1 Message Date
rash
f04df7a6ee Migrate vue2 control components and widget to vue3 and vite (#5989)
* setup vite and integrate fully with django

- vite starts with `python manage.py runserver`
- add templatetags to simply load vite hmr and entry points
- add eslint (recheck rules)
- enable non-strict ts

* better syntax for cors header setting

* migrate checkin rules editor to vue3

- move constants to a module
- move reading from and writing to non-vue html to django interop module
- switch to composition api and script setup sfc with pug
- use optional chaining operators a lot to simplify code

* migrate webcheckin plugin to vite+vue3

- migrate vue sfcs to script setup and pug
- move fetch calls into a api.ts module
- move common formatting and i18n strings into module

* fix migration error

* first draft migrating widget to vue3/vite

* first couple widget e2e tests

courtesy of claude
most of the tests don't work yet

* test file is not actually used

* drop widget_ prefix from e2e test fixtures

* add test for complete widget journey for simple event

* switch timezone in e2e tests to Europe/Berlin

* make dates in e2e tests relative

* migrate widget bugfix #5886

* start testing event series widget

* working vite widget setup for prod (untested), local dev (with or without dev server) and pytests, with flags for running the old version or the vite version

* simplify e2e test iframe check

* less flaky e2e tests

* top level await in iife build mode is not supported, so let's do import.meta.glob instead (we just need the build step not to see await, the code doesn't actually ever get loaded because it's DEV only)

* fix inconsistencies from automatic migration

* Allow gradual rollout of new vite-based widget by adding urls to an allowlist that gets checked against the "Origin" http header of request fetching the widget js

* add e2e tests for widget button, testing empty cart, adding specific items, and subevents

* remove janky claude testts again

* resolve migration TODOs: properly refocus parent on navigations

* use `npm run dev:control` for the vite dev server for admin components

* upgrade npm dependencies

* fix js linter errors

* fix python linter errors

* build all control vue components

* add new js config files to check-manifest ignore

* working prod build

acutal serving of built assets not tested yet

* fix templatetag paths to match what's in the vite mantifest

* add missing quotes around 'unsafe-eval' cors value

* remove now unused old vue2 tooling

* try fixing e2e test ci

* fix flake8 error

* check if vite build artefacts are in the wheel

* add license headers

* remove dom manipilation code necessary for `div.pretix-widget-compat` to work. No longer needed for vue3

* remove superfluous `createElement` calls

They might have been there because of IE, which is no longer relevant

* make widget dev mode parametizable through query params and document the usage and those params

* fix rst syntax

* remove migration todos file

Co-authored-by: luelista <mira@teamwiki.de>

* rearrange dockerfile commands for smaller image, thanks @luelista

* Update .gitignore, adding .vite

Co-authored-by: luelista <mira@teamwiki.de>

* add eslint CI

* make vue dev work in plugins

* fix docker build

* rebuild vite setup to support static prod plugins and dynamic hmr plugin development

* use toml for vite plugin config instead of standalone json file

* Add widget changes from #6047, #6149

* Allow buttons to reuse cart (Z#23226853)

* Always keep cart of buttons with items set

* widget: handle cart if not same-site (#6149)

---------

Co-authored-by: luelista <mira@teamwiki.de>
Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>
2026-05-11 15:05:06 +02:00
Raphael Michel
3b30553880 Use "npm ci" to build pretix (#5451) 2025-09-19 14:34:30 +02:00
Raphael Michel
0c998ca884 Remove special handling of translations in pretix/helpers 2024-04-03 12:43:20 +02:00
Raphael Michel
e7db4e7c42 Add npminstall to pip and docker build processes 2021-03-30 14:29:18 +02:00
Raphael Michel
92a50cb2d1 Web-based check-in interface (#1985) 2021-03-30 09:34:11 +02:00
Raphael Michel
3b5d811b27 Update po files
[CI skip]

Signed-off-by: Raphael Michel <mail@raphaelmichel.de>
2021-03-08 17:40:02 +01:00
Raphael Michel
5a034f1339 Exclude rrule from locale files 2020-11-27 18:34:08 +01:00
Raphael Michel
59fa5112fc Prepare for using weblate 2018-03-06 18:25:46 +01:00
Raphael Michel
9a6f299b41 Commit POT files 2018-03-06 11:31:17 +01:00
Raphael Michel
9213a40219 Widget: docs and i18n 2017-10-28 23:02:54 +02:00
Raphael Michel
aba7652aee Update django-statici18n to 1.3 2017-01-23 00:09:57 +01:00
Raphael Michel
9f90ac80a0 Workaround to fix #378
See https://github.com/zyegfryed/django-statici18n/pull/29 for real fix
2017-01-18 10:02:53 +01:00
Raphael Michel
e75bce37bc Fix incorrect paths in Makefile 2017-01-05 13:08:40 +01:00
Raphael Michel
4d7b5a0a3b Update German translation 2016-11-27 19:54:25 +01:00
Raphael Michel
302c6da17f Fix integration of django-statici18n 2016-11-09 19:47:42 +01:00
Raphael Michel
45b960b97c Use django-statici18n in production 2016-11-09 19:08:51 +01:00
Raphael Michel
5cca426cd3 Removed all inline <script> tags 2016-04-10 16:44:49 +02:00
Raphael Michel
0044078ec5 Translate django-internal strings to de_Informal 2016-03-20 10:21:56 +01:00
Raphael Michel
312b53bb78 Add testing commands to makefile 2015-06-05 15:00:56 +02:00
Raphael Michel
d1473b9958 Pin version requirements, add more tasks to makefile, specify python
version in manage.py shebang
2015-05-15 22:54:12 +02:00
Raphael Michel
cc6d624f57 Starting with localisation 2014-09-11 11:19:06 +02:00