Skip to content
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

feat: ThreadList and ThreadProvider (v2) #2407

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

arnautov-anton
Copy link
Contributor

@arnautov-anton arnautov-anton commented May 29, 2024

Note

This is still work in progress...

🎯 Goal

Draft PR for the new threads API.

Adjust stream-chat install link on branch feat/threads-v2.
Adjust @stream-io/stream-chat-css install link on branch refactor/react-remove-legacy-style-deps.

MartinCupela and others added 3 commits June 17, 2024 11:00
BREAKING CHANGE: stylesheet import path changed & v1 stylesheet has been dropped, see release guide for more information
BREAKING CHANGE: theme v1 related markup and classNames have been removed
BREAKING CHANGE: `themeVersion` property has been removed from `ChatContext`
…l container (#2406)

BREAKING CHANGE: The VirtualizedMessageList does not provide default
Footer component
BREAKING CHANGE: The VirtualizedMessageList markup has changed as
TypingIndicator is rendered as a child of MessageListMainPanel
Our build pipeline contained some quirks and the remains of previous
setups. It was time to clean it up :)

The main changes are:

**No rollup.** Previously our build pipeline was implemented in rollup.
To simplify things up, we now just run a couple of processes in
parallel: tsc to build our normal distribution and type declarations,
esbuild to build bundles, and a shell script to include assets in the
distribution.

For development, just `tsc --watch` is enough.

**No babel.** Previously our rollup config included babel transpilation
with babel-preset-env. That means we included babel-runtime in our
distribution, and transpiled async functions into generators with the
notorious `regenerator-runtime`.

Babel is now excluded from the build process (but still used as a parser
for JS files in eslint). Targeting ES2020 in tsc and esbuild should be
enough. And we finally have regular async functions in our distribution
:)

**Esbuild for bundles.** We now use esbuild instead of rollup for
creating a CJS bundles. And we no longer create UDM browser bundles.

**TS5.** I used this opportunity to bump TypeScript version as well :)

Also, removed webpack and postcss dependencies - they were not used at
all.

1. Bump prettier, eslint and eslint plugin versions. Will result in *a
lot* of warnings, but good for future-proofing.
2. Review our eslintrc, it's currently a bit of a mess.
3. Remove babel completely, use typescript-eslint instead.
4. Switch to `"module": "NodeNext"` in tsconfig. This is the new
recommended option for libraries, but will require us to add extensions
to all of our import statements, to make them fully qualified.
5. (breaking change) With `"module": "NodeNext"` we will be ready to add
`"type": "module"` in our package.json. We can't do that now, because
fully specified import statements are expected from module packages.
6. (breaking change) Drop all bundles. CJS bundle is kinda weird anyway.
Browser bundle can be replaced by `<script type="module">`.

---------

Co-authored-by: Anton Arnautov <[email protected]>
MartinCupela and others added 9 commits June 17, 2024 11:08
## [12.0.0-rc.1](v11.21.0...v12.0.0-rc.1) (2024-06-17)

### ⚠ BREAKING CHANGES

* The VirtualizedMessageList does not provide default
Footer component
* The VirtualizedMessageList markup has changed as
TypingIndicator is rendered as a child of MessageListMainPanel
* stylesheet import path changed & v1 stylesheet has been dropped, see release guide for more information
* theme v1 related markup and classNames have been removed
* `themeVersion` property has been removed from `ChatContext`

### Bug Fixes

* render typing indicator outside the VirtualizedMessageList scroll container ([#2406](#2406)) ([fcaafb6](fcaafb6))

### Features

* remove legacy style components ([#2394](#2394)) ([9410153](9410153))
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.

None yet

4 participants