Skip to content

fix(react): #ENABLING-1119 casse l'import circulaire AddAttachments/SingleAttachment - #565

Open
pascalsaussier-edifice wants to merge 1 commit into
develop-enablingfrom
fix-ENABLING-1119-circular-import-attachments
Open

fix(react): #ENABLING-1119 casse l'import circulaire AddAttachments/SingleAttachment#565
pascalsaussier-edifice wants to merge 1 commit into
develop-enablingfrom
fix-ENABLING-1119-circular-import-attachments

Conversation

@pascalsaussier-edifice

@pascalsaussier-edifice pascalsaussier-edifice commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Corrige un import circulaire qui empêche AddAttachments d'être rendu quand il est importé directement (hors barrel), notamment sous Vitest : le rendu plantait avec Element type is invalid ... got: undefined au niveau de SingleAttachment.

Cause : plusieurs composants du sous-arbre AddAttachments importaient Attachment, IconButton, Button, Modal et Tooltip via des barrels ancêtres (src/index.ts, src/components/index.ts), encore en cours d'évaluation quand l'entrée se fait par AddAttachments. Remplacés par des imports relatifs directs vers les fichiers sources — aucun changement de comportement fonctionnel.

Ticket : ENABLING-1119

Which Package changed?

  • Components

Has the documentation changed?

  • Storybook

Type of change

  • Bug fix (PATCH)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Comment tester

  1. pnpm test --filter=./packages/react — passe intégralement (252 fichiers / 2425 tests), incluant le nouveau AddAttachments.spec.tsx qui couvre editMode (ajout/suppression), téléchargement et copie vers l'espace.
  2. pnpm --filter @edifice.io/react build — build/déclarations de types OK.
  3. AddAttachments.stories.tsx en Storybook — inchangé, pas de régression visuelle attendue (chemins d'import seulement).

jcbe-ode
jcbe-ode previously approved these changes Aug 13, 2026
damienromito
damienromito previously approved these changes Aug 24, 2026
@pascalsaussier-edifice
pascalsaussier-edifice dismissed stale reviews from damienromito and jcbe-ode August 25, 2026 15:19

The merge-base changed after approval.

…ingleAttachment

Les imports via barrels ancêtres (src/index.ts, src/components/index.ts)
laissent des bindings undefined quand le graphe de modules est encore en
cours d'évaluation à l'entrée par AddAttachments, sous Vitest. Remplacés
par des chemins relatifs directs vers Attachment, IconButton, Button,
Modal et Tooltip.
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the fix-ENABLING-1119-circular-import-attachments branch from d95aeb7 to 3863948 Compare August 26, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants