mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
webapp/platform publishes six packages and the channels app carries a seventh in-tree, and every one of them went out under @mattermost — types, client, components, shared, eslint-plugin, compass-icons and mattermost-redux — while the plugin that consumes them already asks for @hanzoteam/types and @hanzoteam/client by name. It could not build: it was asking a registry for a package nobody publishes. They are @hanzoteam/* now, and mattermost-redux is @hanzoteam/redux, moved to src/packages/@hanzoteam/redux so the directory matches the alias that always pointed there. @mattermost/calls-common and @mattermost/desktop-api stay. Those are published by someone else and resolved from npm; renaming a package we merely consume would name a thing that does not exist. The jest moduleNameMapper entries needed doing by hand — they spell the scope inside a regex, so a sweep over the plain name walks straight past them, and a missed one fails at require time rather than at build.
1.4 KiB
1.4 KiB
CLAUDE: platform/components/ (@hanzoteam/components)
Purpose
- Cross-product React components (GenericModal, tour tips, loaders, hooks) shared by Channels, Boards, Playbooks, and plugins.
- Ensures consistent UX, theming, and accessibility across Mattermost surfaces.
Implementation Guidelines
- Follow
webapp/STYLE_GUIDE.md → React Component Structure,Styling & Theming,Accessibility. - Components must be framework-agnostic: accept data/handlers via props, avoid direct Redux or routing dependencies.
- Keep styles local via SCSS modules or styled components already used in this package; expose classNames for host overrides when necessary.
- Include Storybook/README snippets where helpful (see package README).
Testing
- All components need RTL tests (
*.test.tsx) demonstrating accessibility behaviors. - Provide test utils (
testUtils.tsx) for consumers who need to mock these components.
Key Modules
generic_modal/– baseline modal with focus trapping and keyboard handling.tour_tip/– coach marks with backdrop management.skeleton_loader/,pulsating_dot/– loading indicators.hooks/– shared hooks likeuseFocusTrap.
Release Notes
- Breaking props or behavior requires updating
platform/components/README.mdand notifying dependent teams.
References
generic_modal/generic_modal.tsx,tour_tip/tour_tip.tsx,hooks/useFocusTrap.test.tsx.