-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ui): channel list item #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6cf5347
add channel list item
renefloor 8d87d7d
update avatar sizes
renefloor 249d4f3
Add badge notification and snapshot tests
renefloor edc8c2b
Improve channel list item for implementation
renefloor be33ab3
chore: Update Goldens
renefloor 698e4ac
remove unused imports
renefloor 6e07494
Merge branch 'main-design-system' into feature/channel-list-item
renefloor dce330f
Merge channel list item with list tile
renefloor 6eb0c43
fix gallery
renefloor aaf1475
chore: Update Goldens
renefloor 9aa05af
Fix background color theming
renefloor 6803dd2
fix avatar size
renefloor da598bd
Added claude code file
renefloor dafcb85
remove channel list item from core
renefloor c247bb1
Merge remote-tracking branch 'origin/main-design-system' into feature…
renefloor bd68b97
cleanup channel list item
renefloor 77f6666
update generated files
renefloor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| A Flutter monorepo managed with **Melos** containing: | ||
| - `packages/stream_core` — Pure Dart SDK (WebSocket, HTTP, models, utilities) | ||
| - `packages/stream_core_flutter` — Flutter UI component library with a full design system | ||
| - `apps/design_system_gallery` — Widgetbook-based interactive component showcase | ||
|
|
||
| ## Common Commands | ||
|
|
||
| All commands use Melos and should be run from the repo root. | ||
|
|
||
| ```bash | ||
| # Setup | ||
| melos bootstrap | ||
|
|
||
| # Linting & formatting | ||
| melos run lint:all # analyze + format check | ||
| melos run analyze | ||
| melos run format | ||
| melos run format:verify # check only, no changes | ||
|
|
||
| # Testing | ||
| melos run test:all # all tests with coverage | ||
| melos run test:dart # stream_core only | ||
| melos run test:flutter # stream_core_flutter only | ||
|
|
||
| # Golden tests | ||
| melos run update:goldens # regenerate golden images | ||
|
|
||
| # Code generation (run after model/theme changes) | ||
| melos run generate:all | ||
| melos run generate:icons # regenerate icon font from SVGs | ||
| melos run gen-l10n # regenerate localizations | ||
| ``` | ||
|
|
||
| **Line width:** 120 characters (set in `analysis_options.yaml`). | ||
|
|
||
| ## Design | ||
|
|
||
| UI components are designed in **Figma**. When implementing or modifying components, use the **Figma MCP** to inspect designs directly — check spacing, colors, typography, and component structure from the source rather than guessing. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Theme System (`stream_core_flutter/lib/src/theme/`) | ||
|
|
||
| Uses `theme_extensions_builder` to generate Material 3 theme extensions. The hierarchy is: | ||
|
|
||
| 1. **Primitives** — raw design tokens: colors, typography, spacing, radius, icons | ||
| 2. **Semantics** — semantic mappings (e.g., `primaryColor`, `bodyText`) | ||
| 3. **Component themes** — per-widget theme classes (50+ components), defined in `theme/components/` | ||
| 4. **Tokens** — light/dark concrete values in `theme/tokens/` | ||
|
|
||
| Generated files have `.g.theme.dart` extension. After modifying `.theme.dart` files, run `melos run generate:flutter`. | ||
|
|
||
| ### Component Structure (`stream_core_flutter/lib/src/components/`) | ||
|
|
||
| Components are organized by category: `avatar/`, `buttons/`, `badge/`, `list/`, `message_composer/`, `emoji/`, `context_menu/`, `controls/`, `common/`, `accessories/`. | ||
|
|
||
| Each component typically has: | ||
| - A widget file | ||
| - A theme file in `theme/components/` | ||
| - A golden test in `test/components/<name>/` | ||
| - A Widgetbook use-case in `apps/design_system_gallery/` | ||
|
|
||
| ### stream_core Package | ||
|
|
||
| Pure Dart. Key modules: | ||
| - `src/ws/` — WebSocket client with reconnect/backoff logic (RxDart-based) | ||
| - `src/api/` — Dio HTTP client with interceptors | ||
| - `src/attachment/` — File upload and CDN client | ||
| - `src/query/` — Query builders and filter models | ||
| - `src/logger/` — Structured logging | ||
| - `src/user/` — User models and token management | ||
|
|
||
| ### Golden Testing | ||
|
|
||
| Golden tests use **Alchemist** (`^0.13.0`). Goldens are stored under: | ||
| - `test/components/<name>/goldens/ci/` — for CI | ||
| - `test/components/<name>/goldens/macos/` — for local macOS development | ||
|
|
||
| Golden tests are tagged with `golden` in `dart_test.yaml`. Run `melos run update:goldens` to regenerate after visual changes. | ||
|
|
||
| ### Code Generation | ||
|
|
||
| - **json_serializable** — model serialization (`.g.dart` files) | ||
| - **build_runner** — orchestrates all generation | ||
| - **theme_extensions_builder** — generates theme extension classes (`.g.theme.dart`) | ||
| - **widgetbook_generator** — auto-generates Widgetbook entries | ||
|
|
||
| After any model or theme annotation changes, run the appropriate generate command before running tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.