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

🔨 Improve typing #182

Merged
merged 10 commits into from
Oct 6, 2022
Merged

🔨 Improve typing #182

merged 10 commits into from
Oct 6, 2022

Conversation

robmorieson
Copy link
Contributor

What does this PR introduce?

  • Fix type issues:
    • Label HelpScout prop types as optional
    • Remove the providerKey type from Messenger props
    • Add optional locale type to LiveChatLoader props
    • Set correct type for React children (as per current recommendation)
  • Convert the example website to TS

Also some minor housekeeping 🧹

  • Align prettier options with other Calibre apps
  • Add dedicated .eslintrc to the example website
  • Rename the static directory to public in the example website (static has been deprecated)

@vercel
Copy link

vercel bot commented Oct 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-live-chat-loader ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 3:43AM (UTC)

@robmorieson robmorieson marked this pull request as ready for review October 6, 2022 01:23
idlePeriod?: number
providerKey: string
appID?: string
baseUrl?: string
locale?: string
Copy link
Member

Choose a reason for hiding this comment

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

Is locale is used by all implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only chatwoot and messenger currently use locale - but in both instances, it's required during initialisation, hence why it's been implemented at the global LiveChatLoaderProvider level

Copy link
Member

@benschwarz benschwarz Oct 6, 2022

Choose a reason for hiding this comment

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

Seems worthy of a comment!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Done ✅

Copy link
Member

@benschwarz benschwarz left a comment

Choose a reason for hiding this comment

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

All seems about right to me. Should there be a README.md update for props updates?

@robmorieson
Copy link
Contributor Author

robmorieson commented Oct 6, 2022

All seems about right to me. Should there be a README.md update for props updates?

@benschwarz no updates required as this actually brings the type defs in line with what's already detailed in the README

@robmorieson robmorieson changed the title 🔨 Improve typing 🔨 Improve typing Oct 6, 2022
Copy link
Member

@benschwarz benschwarz left a comment

Choose a reason for hiding this comment

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

All good with me!

@robmorieson robmorieson merged commit 549dc3a into main Oct 6, 2022
@robmorieson robmorieson deleted the types branch October 6, 2022 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants