Allow Custom Components to embed Standard Components

Aberta
#747 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
rust, sql
Domínio
frontend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
2.6k
Forks
175
Merge médio
14h 16min
PRs com merge (30d)
43

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sqlpage/SQLPage

Todas as issues de sqlpage/SQLPage

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.