Skip to content

Programa: añadir página con widget de Pretalx#213

Merged
francescarpi merged 3 commits into
mainfrom
feat/horario
Jul 8, 2026
Merged

Programa: añadir página con widget de Pretalx#213
francescarpi merged 3 commits into
mainfrom
feat/horario

Conversation

@francescarpi

Copy link
Copy Markdown
Collaborator

Descripción

Añade la página /programa con el widget de Pretalx embebido, mostrando el cronograma de PyConES en los 3 idiomas soportados (es/en/ca).

Cambios

  • Nueva página src/pages/[lang]/programa.astro con getStaticPaths para es/en/ca
  • Nuevo componente src/components/ProgramaPage.astro (h1, intro, widget, noscript fallback)
  • Nuevo módulo i18n src/i18n/programa/{index,es,en,ca}.ts
  • Menú: Programa / Programme insertado como 2º item (después de "Inicio")
  • Layout: nueva prop opcional fullWidth para contenido full-viewport (sin container)
  • Widget: wrapeado en overflow-x-auto para scroll horizontal en viewports angostos
  • Dialog de filtros: estilos inyectados al shadow root del widget vía JS (Pretalx usa Shadow DOM, el CSS del light DOM no penetra)

Testing

  • Abrir /es/programa y verificar que el calendario carga y se ve bien
  • Repetir en /en/programa y /ca/programa
  • Pulsar el botón de filtros y comprobar que el dialog sale con fondo blanco
  • Probar scroll horizontal del calendario en mobile
  • Verificar que el menú muestra "Programa" como 2º item en los 3 idiomas

Notas

  • El widget apunta a event-url="https://pretalx.com/pycones-2025/" por ahora (es el evento con schedule publicado). Cambiar a pycones-2026 cuando exista el evento con cronograma.
  • El locale ca puede caer al default (inglés) si Pretalx no tiene UI en catalán para este evento. Si se quiere forzar castellano, cambiar locale: 'ca' por locale: 'es' solo en src/i18n/programa/ca.ts.

Embeds the Pretalx schedule widget at /programa for the 3 supported
locales, with the menu entry as the 2nd item after Inicio.

Includes:
- Page wrapper with getStaticPaths for es/en/ca
- Localized component (h1, intro, widget, noscript fallback)
- New i18n module (programa/{index,es,en,ca}.ts)
- Layout: optional fullWidth prop for full-viewport content
- Widget wrapped in overflow-x-auto for horizontal scroll on narrow viewports
- Dialog styles injected into the widget's shadow root via JS,
  since Pretalx uses Shadow DOM and light-DOM CSS does not cross it
@francescarpi francescarpi self-assigned this Jul 7, 2026
The pretalx-schedule web component auto-detects a scrollParent by
walking up the DOM looking for the first ancestor with overflow auto
or scroll. When the wrapper had overflow-x-auto, the widget adopted
it as scrollParent. Its programmaticScrollTo passes document-coordinate
Y values to scrollParent.scrollTo(), which expects scrollParent-relative
coords, so the browser silently clamped the scroll and day tab clicks
appeared to do nothing.

Dropping overflow-x-auto makes scrollParent resolve to the window,
where the same coordinate value works correctly.
@itziarZG

itziarZG commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

català no funciona... però potser prettiex no ho té?

@francescarpi francescarpi marked this pull request as ready for review July 8, 2026 09:35
@francescarpi

Copy link
Copy Markdown
Collaborator Author

català no funciona... però potser prettiex no ho té?

M'acaben de confirmar que a pretix no hi ha català. Així que és normal.

@francescarpi francescarpi merged commit f1c9f20 into main Jul 8, 2026
1 check passed
@francescarpi francescarpi deleted the feat/horario branch July 8, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants