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

chore: Update docs site and README with addition usage info #13

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

mrderyk
Copy link
Contributor

@mrderyk mrderyk commented Feb 28, 2024

CONTEXT

In order to widen the number of developers that can use this module, we offer the useChat hook so that user can create their own views. In order to support them, we need to provide guidance for hook usage in the docs site as well as README.

CHANGES

  • Add screenshots to UI section of README
  • Update docs site with basic hook usage + a link to the README for a deeper dive into the hook return values
  • Update README with details on hook values - types and comments on what they can be used for
  • Update error hook value to hasError to be more instantly readable as a boolean value.

SCREENSHOTS

DOCS SITE CHANGES

Screenshot 2024-02-28 at 10 27 23 AM

README CHANGES

Screenshot 2024-02-28 at 10 33 35 AM Screenshot 2024-02-28 at 10 33 25 AM Screenshot 2024-02-28 at 10 33 55 AM

UI SECTION

USECHAT HOOK SECTION

Screenshot 2024-02-28 at 10 28 07 AM Screenshot 2024-02-28 at 10 29 02 AM Screenshot 2024-02-28 at 10 29 07 AM

Copy link

github-actions bot commented Feb 28, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-02-28 21:10 UTC

@mrderyk mrderyk changed the title chore: Update docs site and README with information on useChat hook chore: Update docs site and README with addition usage info Feb 28, 2024
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

These docs are fantastic! Had a few comments but they look great to me overall.

README.md Outdated

<img alt="Retry message" src="images/messageWithError.png" width=350></img>

Vectara's chatbot is also ready for use on mobile sites, taking the fullscreen when the chat window is opened:
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, I think we should change "Vectara's chatbot" to "React-Chatbot".

Spelling: "fullscreen" -> "full screen"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And this is why I need you for reviews. 😆 "Vectara's chatbot" is absolutely not ideal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated

_For more information on data ingestion, see our [vectara-ingest](https://github.com/vectara/vectara-ingest) repository._

##### isLoading: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Should boolean be formatted as code?

`boolean`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated

A boolean value indicating whether or not a chat API request is still pending

##### hasError: boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated
This is an array of objects representing question and answer pairs from the entire conversation. Each pair is a `ChatTurn` object, which is typed as:

```
export type ChatTurn = {
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT of linking to https://github.com/vectara/react-chatbot/blob/main/src/types.ts instead of duplicating the definition here? It will make maintenance easier by reducing the risk of divergence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated
};
```

_For more information on data ingestion, see our [vectara-ingest](https://github.com/vectara/vectara-ingest) repository._
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a bit of a non-sequitur. We're already linking to Vectara Ingest in a narrower context, above, so maybe we can remove this bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

README.md Outdated

### Usage with SSR Frameworks

Using React-chatbot with SSR frameworks may require additional infrastucture. Here are some common gotchas:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use this casing consistently: "React-Chatbot".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mrderyk mrderyk merged commit 7edc62c into main Feb 28, 2024
4 checks passed
@mrderyk mrderyk deleted the chore/document_hook branch February 28, 2024 21:09
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