cal/packages/embeds/embed-react
Julius Marminge db7c3fb52f
feat: trpc v10 migration (#5332)
* migrate router

* createTRPCReact

* frontend 1

* random format change

* frontend 2

* withQuery

* form router

* TS-ERROR: proxy on utils-client

* inferance

* ssg

* reuse

* trpc rc4

* Apply suggestions from code review

* skip test

* move skip one level up

* whops

* rc 6 with new setData func

Co-authored-by: zomars <zomars@me.com>
2022-11-10 23:40:01 +00:00
..
playwright Add embed tests in CI (#2887) 2022-05-30 22:41:05 +05:30
src Embed Improvements: Add auto-scroll support back, reduce CLS, remove loader for Routing Form embed (#4819) 2022-10-14 10:10:54 +00:00
.gitignore Embed Miscellaneous Improvements and Fixes (#2499) 2022-04-25 10:03:00 +05:30
env.d.ts Fix @calcom/embed-react installation with TS project (#2870) 2022-05-27 09:37:02 -06:00
index.html [Feature]Booking Embed (#2227) 2022-03-31 09:45:47 +01:00
LICENSE Add licenses to embeds (#2984) 2022-06-07 08:25:55 +00:00
package.json Downgrade plugin to match vite version (#5410) 2022-11-08 08:51:24 +00:00
README.md feat: trpc v10 migration (#5332) 2022-11-10 23:40:01 +00:00
test-cal.tsx Embed Improvements: Add auto-scroll support back, reduce CLS, remove loader for Routing Form embed (#4819) 2022-10-14 10:10:54 +00:00
tsconfig.json Add embed tests in CI (#2887) 2022-05-30 22:41:05 +05:30
vite.config.js Fix @calcom/embed-react installation with TS project (#2870) 2022-05-27 09:37:02 -06:00

cal-react

Embed Cal Link as a React Component

To know how to use it, follow the steps at https://developer.cal.com/embed/install-with-react

Development

Following command starts a hot reloading server yarn dev

If you are working with embed on website, don't forget to do yarn build after every change.

Running Tests

Runs tests and updates the snapshots. Right now we don't care about snapshots yarn embed-tests-quick --update-snapshots TODO

  • Playwright tests.
    • Need to what these tests should be as embed-core already have tests. We probably just need to verify that embed-core API is called appropriately.
    • It would probably be better if Playwright tests exist at one place for all embeds.
  • Distribution
    • It would be better DX to serve the unbuilt version with JSX, instead of built version with React.createElement calls. But because of WebPack loaders not running on node_modules automatically, it doesn't work automatically.
    • Right now if a typescript project uses the package, VSCode takes the user to .d.ts files instead of the functions definitions. How to solve it ?