ReqoreProgress: under an inherited custom theme the track takes the surface colour (the intent check misfires), so an empty bar vanishes

Open Beginner friendly
#711 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Start in src/components/Progress/index.tsx and inspect getProgressColor, then trace how the intent prop and inherited theme values are used. Reproduce with the provided ReqoreModal and ReqoreProgress value={0} example; done means a no-intent track remains visibly neutral under a custom theme while intent-colored bars still work. No test file is named in the issue, so check for nearby progress tests.

Written by the indexing model from the issue text.

Description

What happens

getProgressColor (src/components/Progress/index.tsx) takes an intent as applied when theme.main !== theme.originalMain. A ReqoreProgress without an intent inside a ReqoreModal / ReqoreDrawer that has a customTheme inherits that custom theme: the drawer wraps its content in ReqoreThemeProvider, and useReqoreTheme inherits by default. So main differs from originalMain although no intent was set.

The track is then painted rgba(main, 0.2), the surface's own colour, on that surface. An empty bar (value={0}) disappears; a filled bar without an intent is drawn in the surface colour too.

<ReqoreModal isOpen customTheme={{ main: '#17171f' }}>
  <ReqoreProgress value={0} />
</ReqoreModal>

The track is invisible inside the modal and visible outside it. Seen with @qoretechnologies/reqore 0.78.0 (beta).

What the landing page needs

qorus.cloud's wizards show their steps as a row of progress bars, one per step (done, current, to come). In the problem dialog and the early-access dialog (ReqoreModals with the card colour as customTheme), the steps still to come vanished.

Without an intent, the track should take the readable neutral it takes outside a custom theme. For example, the bar could tell an intent from the intent prop rather than from main !== originalMain.

What we did meanwhile

inheritCustomTheme={false} on each bar: src/components/wizard/WizardProgress.tsx in qorus-saas-landing, marked TODO(reqore) (PR https://github.com/qoretechnologies/qorus-saas-landing/pull/19).

Dominant language
TypeScript
Stars
4
Forks
0
Avg merge
16h 28m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qoretechnologies/reqore

All issues in qoretechnologies/reqore

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.