Export useNarrowContainer from the package index (container-width layouts in consumers)

Aperta
#705 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Foxhoundn ci sta già lavorando.

Dal 7/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

What the landing page needs

useNarrowContainer (src/hooks/useNarrowContainer.ts) exported from the package index, next to useReqoreProperty:

import { useNarrowContainer } from '@qoretechnologies/reqore';

Today it is only reachable as @qoretechnologies/reqore/dist/hooks/useNarrowContainer.

Why

qorus.cloud's "How it works" diagram (qorus-saas-landing PR #19, redesign package WP6) puts HTML words around an SVG: system tiles on the left, labels beside a node. Under about 680px of its own width the words no longer fit, and the diagram switches to a stacked "strip" of Reqore callouts. That is a container-width decision, not a viewport one: Reqore's isMobile (480px) leaves small tablets and phones in landscape squeezed, and a CSS container query does not work through styled-components 5 (the hook's own comment explains why). useNarrowContainer is exactly the measurement needed.

A deep dist/ import would work, but the site keeps to the package's public entry: in the site's Vitest/Storybook runs a new deep import is discovered after the dependency pre-bundle and re-optimises it mid-run ("Failed to fetch dynamically imported module").

What the site does meanwhile

A ten-line local hook (ResizeObserver on the diagram's wrapper, the screen width as the first guess) in src/components/home/ConvergenceDiagram.tsx, marked TODO(reqore) with this issue; it is swapped for the import once a release exports the hook.

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.