Skip to content

✨(components) add mass import into share modal + others components#282

Open
NathanVss wants to merge 8 commits into
mainfrom
feat/import-contact
Open

✨(components) add mass import into share modal + others components#282
NathanVss wants to merge 8 commits into
mainfrom
feat/import-contact

Conversation

@NathanVss

@NathanVss NathanVss commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a contacts import flow to the share modal, plus the building blocks it needed.

  • New ShareImportModal: import contacts from a CSV/XLSX file (email, role). Parsing and validation happen client side, the parsed rows are handed to the consumer via onImportContacts. A template file can be downloaded from the modal.
  • The share modal gets an allowFileImport prop that shows an "Import contacts" menu on the members title (hidden when canUpdate is false).
CleanShot.2026-07-20.at.17.22.18.mp4

  • Some styling refinements on the share modal to match the latest mockups (role dropdowns, section titles, long emails wrapping).
  • ShareModal docs moved to an MDX guide, and e2e coverage added for the share modal and the import flow.

Before

Capture d’écran 2026-07-20 à 17 24 46

After

Capture d’écran 2026-07-20 à 17 24 57

@NathanVss
NathanVss force-pushed the feat/import-contact branch 2 times, most recently from 6e05378 to 5c3e706 Compare July 21, 2026 09:24
This version ships minor fixes that we need for the import
contact feature.
Wrap cunningham's new Alert to swap the material icons for the kit's
own icon set, so alerts render consistently with the other components.
It is exported at the root for direct use by consumer apps.
The uploader is a form control, so it now lives alongside the other
form components and its stories under Components/Forms. The move also
brings an MDX docs page. Root exports are unchanged for consumers.
Role and link dropdown triggers now use nano neutral buttons with the
kit's chevron icons, and section titles are lighter, to match the new
share modal design. User rows break long names and emails instead of
overflowing. Stories say Reader instead of Viewer to follow the
products' wording.
Apps can now offer a CSV/XLSX contact import with a downloadable
template. Parsing and validation (type, size, row count, columns)
happen client side via read-excel-file so errors surface immediately
in the uploader, before anything reaches the backend. The rows are
handed to the app through onImport. Behaviour is covered by dedicated
component tests.
With allowFileImport set, an Import contacts menu in the members title
opens ShareImportModal, so apps only have to wire onImportContacts.
Returning false keeps the modal open for the app to surface a server
error through importModalChildren. The stories showcase the flow and
its failure path, and the component docs move to a proper MDX page.
The single spec had grown too large to navigate as the modal gained
features. Tests are now grouped per area (basics, link settings,
invitations, members, search, import) on top of a shared mount helper
that records callback calls so scenarios stay serializable across the
Playwright CT bridge.
@NathanVss
NathanVss force-pushed the feat/import-contact branch from 995b6e7 to 9304a78 Compare July 23, 2026 13:44
The spec asserted the input's y equals the last chip row exactly. On
CI's Linux font rendering the chips are wider, the last row is full
and the input wraps to its own row below, so the equality only held
on chromium. Assert the input never stays pinned above the chip rows
instead, which is the behaviour the test is really about.
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.

2 participants