ReqoreTier: no props for the card's internal spacing, and currency is dropped for numeric-string prices
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 0
- Merge medio
- 16 h 28 min
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de qoretechnologies/reqore
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
qoretechnologies/reqore#725 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
qoretechnologies/reqore#711 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
qoretechnologies/reqore#675 ·
Los mantenedores suelen responder en 1 día
-
Checkbox: a long description pushes the control out of its container — the label column cannot shrinkPosiblemente ocupada @Foxhoundn la tomó hace 49 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
qoretechnologies/reqore#662 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
qoretechnologies/reqore#745 ·
Los mantenedores suelen responder en 1 día
Todos los issues de qoretechnologies/reqore
Issues similares
-
area: documentation status: in progress type: documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
Oddmash/oddmash-ui#222 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
appium/appium-wincore-driver#169 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
india-ultimate/hub#715 ·
Los mantenedores suelen responder en 1 día
-
documentation Entwickler
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
Los mantenedores suelen responder en 1 día