Widget: Support for inline seating plan #2997
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Okay, so this is an experimental idea. We've had some complaints that the widget does not show the seating plan directly, but instead always opens its overlay for the seating plan.
With our ongoing work of rewriting our seating plan renderer, we have a well-capsuled seating component now which we could properly embed in the widget.
However, I'm very unsure as to how to do that without giving up our loose coupling between pretix and pretix-seating. First, pretix-seating is not open source. Second, we actually know of people running their own seating plugin instead of pretix-seating. So I'd prefer to keep the louse coupling.
That leaves us with two approaches:
This PR implements the second idea. It has some advantages, such as keeping a small interface between pretix and pretix-seating, but one large disadvantage: The seating part of the widget is not accessible through CSS. The buttons will look different (I first tried to fix that by just working without a second button but that would require refactoring our seat validation), and we can work around part of it with some conditional
background:transparent
statements that I have not yet added, but it will always look slightly off since it's using different fonts etc.For these reasons and for backwards compatibility I declared it opt-in. Still better than nothing for many users!
Do we want to follow this approach further, the other approach, or none at all?
Internal note: See also https://code.rami.io/pretix/pretix-seating/-/merge_requests/12