ReqoreTier: no way to tune the spacing between its sections without overriding internal DOM
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- css, react, typescript
Direzione di ricerca
Start by locating the ReqoreTier component and its ReqoreControlGroup layout, then check the related tests and how section spacing is currently rendered. The issue offers several possible solutions, so confirm the intended API with maintainers before choosing an approach. Done means consumers can control spacing between Tier sections without relying on positional DOM selectors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The gap ReqoreTier gives you, and the one you want
Inside a Tier, the price block, the description, the action button and the feature
list are children of one vertical ReqoreControlGroup with a single gapSize='big'.
There is no prop for the spacing between them, so a consumer who wants the price
detail ("No credit card required") to sit closer to its button than to the next
section has exactly one option: reach into the rendered DOM.
That is what the Qorus marketing site does on /pricing:
/* src/pages/PricingPage.tsx */
.reqore-spacer + .reqore-control-group > .reqore-control-group:nth-child(2):not(:has(.reqore-icon)) {
.reqore-paragraph:last-child { padding-bottom: 16px; }
& + * { margin-top: -16px; }
}
Two things are wrong with it, and both are ours to fix rather than theirs:
- It is structural, so it breaks silently. Any change to the Tier's internal
markup — one moreReqoreVerticalSpacer, a wrapper around the price — retargets
or detaches the rule, with no type error and no test failure. - It cannot be aimed.
.reqore-spacer + .reqore-control-group > .reqore-control-group:nth-child(2)
matches the feature list too, because that list also follows a spacer. The
-16pxtherefore landed on a feature row and pulled it up over the row above
whenever the text wrapped to two lines. The:not(:has(.reqore-icon))above is
the workaround (feature rows always start with a check icon) — a selector nobody
should have to reason about to set a margin.
What would solve it
Anything that names the sections instead of counting them. In rough order of
preference:
gapSizeper section, e.g.priceGapSize/contentGapSize/featureGapSize
(or onegaps={{ price: 'small', features: 'normal' }}).- Stable class hooks on the Tier's parts —
.reqore-tier-price,
.reqore-tier-action,.reqore-tier-features— so a consumer's CSS targets a
documented contract rather than sibling position. Cheap, and it fixes the
"matched the wrong group" half on its own. - A
priceDetailslot that owns its own spacing, since "small print under the
price, tight to the button below it" is the case every pricing page has.
Related: #675 (the Tier drops
currency when price is a string) came out of the same page.
- Lingua principale
- TypeScript
- Stelle
- 4
- Fork
- 0
- Merge medio
- 16h 28m
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qoretechnologies/reqore
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
qoretechnologies/reqore#725 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qoretechnologies/reqore#711 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
qoretechnologies/reqore#675 ·
I maintainer di solito rispondono entro 1 giorno
-
Checkbox: a long description pushes the control out of its container — the label column cannot shrinkForse già presa @Foxhoundn l’ha presa 49 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
qoretechnologies/reqore#662 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
qoretechnologies/reqore#745 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di qoretechnologies/reqore
Issue simili
-
area: documentation status: in progress type: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
Oddmash/oddmash-ui#222 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
appium/appium-wincore-driver#169 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
india-ultimate/hub#715 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation Entwickler
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
I maintainer di solito rispondono entro 1 giorno