ReqoreTier: no way to tune the spacing between its sections without overriding internal DOM
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- css, react, typescript
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 0
- Avg merge
- 16h 28m
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qoretechnologies/reqore
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
qoretechnologies/reqore#725 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
qoretechnologies/reqore#711 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
qoretechnologies/reqore#675 ·
Maintainers usually reply within 1 day
-
Checkbox: a long description pushes the control out of its container — the label column cannot shrinkPossibly taken @Foxhoundn claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
qoretechnologies/reqore#662 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
qoretechnologies/reqore#745 ·
Maintainers usually reply within 1 day
All issues in qoretechnologies/reqore
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zabuton-app/meguri#875 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
iruzen-dono/workless#117 ·
Maintainers usually reply within 1 day
-
area:api area:web wave wave:trivial
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vetro-protocol/vetro-monorepo#1321 ·
Maintainers usually reply within 1 day