Allow Custom Components to embed Standard Components

Ouverte
#747 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
30/100
Type d'issue
Fonctionnalité
Clarté
À clarifier
Activité
À l'abandon
Stack technique
rust, sql
Domaine
frontend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
2.6k
Forks
175
Merge moyen
14 h 16 min
PR mergées (30 j)
43

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sqlpage/SQLPage

Toutes les issues de sqlpage/SQLPage

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.