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

Fixing docgen issue #556

Merged
merged 3 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@

/*! exports provided: name, description, homepage, main, version, engines, directories, files, maintainers, repository, devDependencies, license, scripts, dependencies, default */

/*! exports provided: name, version, description, author, homepage, typings, main, module, jsnext:main, style, jsdelivr, keywords, dependencies, peerDependencies, files, devDependencies, husky, scripts, stylelint, browserslist, default */
/*! exports provided: name, version, description, author, homepage, typings, main, module, jsnext:main, style, jsdelivr, keywords, dependencies, peerDependencies, files, devDependencies, husky, scripts, stylelint, resolutions, browserslist, default */

/*! exports provided: nonPassive */

Expand Down Expand Up @@ -1364,6 +1364,10 @@
!*** ./src/context/TranslationContext.js ***!
\*******************************************/

/*!********************************************!*\
!*** ../stream-chat-js/dist/browser.es.js ***!
\********************************************/

/*!********************************************!*\
!*** ./node_modules/axios/lib/defaults.js ***!
\********************************************/
Expand Down Expand Up @@ -2700,10 +2704,6 @@
!*** ./node_modules/remark-parse/lib/locate/url.js ***!
\*****************************************************/

/*!*****************************************************!*\
!*** ./node_modules/stream-chat/dist/browser.es.js ***!
\*****************************************************/

/*!*****************************************************!*\
!*** ./node_modules/use-sidecar/dist/es2015/env.js ***!
\*****************************************************/
Expand Down Expand Up @@ -7024,6 +7024,10 @@
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/slots/UsageTabButton.js ***!
\*******************************************************************************************/

/*!*******************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/Chat.md ***!
\*******************************************************************************************/

/*!*******************************************************************************************!*\
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier_Base.js ***!
\*******************************************************************************************/
Expand Down Expand Up @@ -7148,6 +7152,10 @@
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Welcome/WelcomeRenderer.js ***!
\**********************************************************************************************/

/*!**********************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/Message.md ***!
\**********************************************************************************************/

/*!**********************************************************************************************!*\
!*** ./node_modules/regenerate-unicode-properties/General_Category/Connector_Punctuation.js ***!
\**********************************************************************************************/
Expand Down Expand Up @@ -7268,6 +7276,10 @@
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageList.md ***!
\**************************************************************************************************/

/*!**************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageTeam.md ***!
\**************************************************************************************************/

/*!**************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/useUserRole.md ***!
\**************************************************************************************************/
Expand Down Expand Up @@ -7308,10 +7320,18 @@
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/StyleGuide/StyleGuideRenderer.js ***!
\****************************************************************************************************/

/*!****************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelHeader.md ***!
\****************************************************************************************************/

/*!****************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/DateSeparator.md ***!
\****************************************************************************************************/

/*!****************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageSimple.md ***!
\****************************************************************************************************/

/*!****************************************************************************************************!*\
!*** ./node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_NFKC_Casefolded.js ***!
\****************************************************************************************************/
Expand Down Expand Up @@ -7408,6 +7428,10 @@
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/AttachmentActions.md ***!
\********************************************************************************************************/

/*!********************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/MessageLivestream.md ***!
\********************************************************************************************************/

/*!*********************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Markdown/Checkbox/CheckboxRenderer.js ***!
\*********************************************************************************************************/
Expand Down Expand Up @@ -7464,10 +7488,18 @@
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/SectionHeading/SectionHeadingRenderer.js ***!
\************************************************************************************************************/

/*!************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewCompact.md ***!
\************************************************************************************************************/

/*!*************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/Markdown/Blockquote/BlockquoteRenderer.js ***!
\*************************************************************************************************************/

/*!*************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/VirtualizedMessageList.md ***!
\*************************************************************************************************************/

/*!*************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Message/MessageTeam.js ***!
\*************************************************************************************************************/
Expand All @@ -7484,6 +7516,10 @@
!*** ./node_modules/react-styleguidist/lib/client/rsg-components/TableOfContents/TableOfContentsRenderer.js ***!
\**************************************************************************************************************/

/*!**************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewMessenger.md ***!
\**************************************************************************************************************/

/*!***************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Attachment/Attachment.js ***!
\***************************************************************************************************************/
Expand All @@ -7492,6 +7528,10 @@
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/Message/MessageSimple.js ***!
\***************************************************************************************************************/

/*!****************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/examples-loader.js!./src/docs/ChannelPreviewLastMessage.md ***!
\****************************************************************************************************************/

/*!*****************************************************************************************************************!*\
!*** ./node_modules/react-styleguidist/lib/loaders/props-loader.js!./src/components/ChannelList/ChannelList.js ***!
\*****************************************************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
</head>
<body>
<div id="rsg-root"></div>
<script src="build/bundle.53b76c3b.js"></script>
<script src="build/bundle.13de61e4.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@
"block-no-empty": null
}
},
"resolutions": {
"ast-types": "^0.14.0"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

"browserslist": [
">0.2%",
"not ie <= 11",
Expand Down
18 changes: 12 additions & 6 deletions src/components/Chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,22 @@ const Chat = ({
const clientMutes = client?.user?.mutes;

useEffect(() => {
const userAgent = client.getUserAgent();
if (!userAgent.includes('stream-chat-react')) {
// should result in something like:
// 'stream-chat-react-2.3.2-stream-chat-javascript-client-browser-2.2.2'
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
const setUserAgent = () => {
const userAgent = client.getUserAgent();
if (!userAgent.includes('stream-chat-react')) {
// should result in something like:
// 'stream-chat-react-2.3.2-stream-chat-javascript-client-browser-2.2.2'
client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
}
};

if (client) {
setUserAgent();
vishalnarkhede marked this conversation as resolved.
Show resolved Hide resolved
}
// don't want client in dep array because it is a required
// prop for this component and we only want this run on mount
// eslint-disable-next-line react-hooks/exhaustive-deps
vishalnarkhede marked this conversation as resolved.
Show resolved Hide resolved
}, []);
}, [client]);

useEffect(() => {
setMutes(clientMutes || []);
Expand Down
19 changes: 1 addition & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2384,30 +2384,13 @@ ast-types-flow@^0.0.7:
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0=

[email protected]:
version "0.13.3"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.3.tgz#50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7"
integrity sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==

[email protected]:
[email protected], [email protected], ast-types@^0.13.2, ast-types@^0.14.0, ast-types@^0.7.2, ast-types@~0.13.2:
version "0.14.2"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd"
integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==
dependencies:
tslib "^2.0.1"

ast-types@^0.13.2, ast-types@~0.13.2:
version "0.13.4"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782"
integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==
dependencies:
tslib "^2.0.1"

ast-types@^0.7.2:
version "0.7.8"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.7.8.tgz#902d2e0d60d071bdcd46dc115e1809ed11c138a9"
integrity sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=

astral-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
Expand Down