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

Aperta Adatta ai principianti
#711 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Inizia da src/components/Progress/index.tsx ed esamina getProgressColor, quindi segui l’utilizzo della prop intent e dei valori del tema ereditati. Riproduci il problema con l’esempio fornito ReqoreModal e ReqoreProgress value={0}; il lavoro è concluso quando una traccia senza intent rimane visibilmente neutra con un tema personalizzato, mentre le barre colorate in base a intent continuano a funzionare. Nell’issue non è indicato alcun file di test, quindi cerca test di progress nelle vicinanze.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
TypeScript
Stelle
4
Fork
0
Merge medio
16h 28m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qoretechnologies/reqore

Tutte le issue di qoretechnologies/reqore

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.