ReqoreTier: no props for the card's internal spacing, and currency is dropped for numeric-string prices
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
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start by locating the ReqoreTier implementation and its tests or stories; the issue does not name their paths. Check how it composes the header, price-detail block, and feature-list control groups, and how currency rendering handles string prices. Done means consumers can control the described spacing through props and numeric-string prices display currency without adding a symbol to custom text; update or add coverage for both behaviors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What the landing page needs
ReqoreTier is the pricing-card component on the Qorus marketing site's /pricing
page (5 plans, dark and light, live plans from the Qorus SaaS product catalog with a
CMS snapshot as the fallback). Two things about it can only be reached today by
writing CSS against Reqore's internal DOM, which is exactly what we are asked not to
do in consuming repos.
1. No control over the spacing inside the card
The Tier hard-codes its internal structure:
<ReqoreControlGroup horizontalAlign='center' vertical gapSize='big'> // name / price / description / action
…
</ReqoreControlGroup>
<ReqoreVerticalSpacer height={20} />
<ReqoreControlGroup vertical> // the feature list
{featureList.map(…)}
</ReqoreControlGroup>
The gapSize='big' group puts the same gap under priceDetail ("per month") as it
puts everywhere else, which is too much for a card that also carries a description
and a feature list. With no prop for it, the site patches it from outside:
const TiersGrid = styled(ReqoreColumns)`
.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; }
}
`;
That selector is a guess about Reqore's DOM, and it has already misfired once: the
feature list is also "a .reqore-spacer followed by a control group", so the rule
matched the second feature row too and pulled the third row 16px up over it — visible
as soon as a feature's text wrapped to two lines. The :not(:has(.reqore-icon)) above
is the workaround. Any change to the Tier's markup breaks it again, silently.
Ask: props for the spacing the Tier composes — e.g. gapSize for the header
group, and featureListProps / priceDetailProps (or IReqoreControlGroupProps
passthroughs) so a consumer can set gapSize/padded on the feature list and the
price block with props instead of selectors.
2. currency is dropped when price is a numeric string
price is typed string | number, but the currency symbol is only rendered when
isNumber(price):
{currency && currencyPosition === 'before' && isNumber(price) ? currency : undefined}
{price}
Prices arriving from an API or a CMS are text ("55", "0"), so
<ReqoreTier price="55" currency="$" /> renders 55 with no symbol, while
price={55} renders $55. The guard is clearly there so price="Custom" gets no
symbol — but it also swallows the common case. The site works around it by parsing
the amount and passing a number:
const amount = /^\d+(\.\d+)?$/.test(tier.price) ? Number(tier.price) : undefined;
<ReqoreTier price={amount ?? tier.price} currency={amount === undefined ? '' : symbol} … />
Ask: render the currency whenever the price is numeric or parses as a number
(!isNaN(Number(price))), so a numeric string behaves like a number; or expose the
decision as a prop. Either way the fix belongs in the Tier, not in every consumer.
What we did meanwhile
Both workarounds are in the landing page (src/pages/PricingPage.tsx), with comments
pointing at the reason, plus a story play test (expectNoVerticalOverlap) that fails
if the spacing selector ever collapses the feature rows again. We will drop both when
the props land.
Filed from the Qorus SaaS landing page; the site may not change Reqore itself.
- 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