Allow Custom Components to embed Standard Components

Abierto
#747 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
rust, sql
Área
frontend

Línea de trabajo

Start by reading SQLPage's custom-component implementation and how standard components are rendered; the issue does not name specific files or tests. The proposed composition mechanism is undecided, so first investigate the existing component model and discuss a design with maintainers before implementation. Done would mean custom components can embed caller-supplied standard components, with tests demonstrating the composition.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

What are you building with SQLPage ?

A project wiki.

What is your problem ? A description of the problem, not the solution you are proposing.

I am using htmx to render modal dialogs for data entry.

At the moment I am using three custom components for this:

  • the htmx enriched button
  • the modal header
  • the modal footer

Having to render a header, then my content using standard components, then the footer feels a bit off. It would be really cool if a custom component could render other components inside themselves somehow - that the caller could somehow supply the body.

What are you currently doing ? Since your solution is not implemented in SQLPage currently, what are you doing instead ?

Separate header, footer as detailed above.

Describe the solution you'd like

Honestly I don't really know the cleanest way to express this. Being able to supply the body of a component using a subselect? I'm not sure. I guess I'm hopeful to have a set of smaller components that can be assembled by a custom component rather than having to specify everything on the custom component. I suspect this would be a total can of worms though.

Describe alternatives you've considered

Copy and pasting standard component template code into my own custom templates - it's not maintainable or pretty. The card component doesn't really work for this scenario either.

Lenguaje dominante
Rust
Estrellas
2.6k
Forks
175
Merge medio
14 h 16 min
PR fusionados (30 d)
43

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sqlpage/SQLPage

Todos los issues de sqlpage/SQLPage

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.