fix: typos in several package/ directories (#19495)
* fix: typos in packages/embeds Found via codespell * fix: typos in packages/lib Found via codespell * fix: typos in packages/trpc Found via codespell
This commit is contained in:
1 parent
16a94fe712
commit
97ef32f7ca
27 files changed
+33
-33
No files matched your search
@@ -101,7 +101,7 @@ Make `dist/embed.umd.js` servable on URL <http://cal.com/embed.js>
|
||||
|
||||
- Release Issues
|
||||
|
||||
- Compatibility Issue - When embed-iframe.js is updated in such a way that it is not compatible with embed.js, doing a release might break the embed for some time. e.g. iframeReady event let's say get's changed to something else
|
||||
- Compatibility Issue - When embed-iframe.js is updated in such a way that it is not compatible with embed.js, doing a release might break the embed for some time. e.g. iframeReady event let's say gets changed to something else
|
||||
- Best Case scenario - App and Website goes live at the same time. A website using embed loads the same updated and thus compatible versions of embed.js and embed-iframe.js
|
||||
- Worst case scenario - App goes live first, website PR isn't merged yet and thus a website using the embed would load updated version of embed-iframe but outdated version of embed.js possibly breaking the embed.
|
||||
- Ideal Solution: It would be to keep the libraries versioned and embed.js should instruct app within iframe to load a particular version. But if we push a security fix, it is possible that someone is still enforcing embed to load version with security issue. Need to handle this.
|
||||
|
||||
@@ -109,7 +109,7 @@ export async function bookFirstEvent(username: string, frame: Frame, page: Page)
|
||||
});
|
||||
|
||||
// Let current month dates fully render.
|
||||
// There is a bug where if we don't let current month fully render and quickly click go to next month, current month get's rendered
|
||||
// There is a bug where if we don't let current month fully render and quickly click go to next month, current month gets rendered
|
||||
// This doesn't seem to be replicable with the speed of a person, only during automation.
|
||||
// It would also allow correct snapshot to be taken for current month.
|
||||
await frame.waitForTimeout(1000);
|
||||
|
||||
@@ -227,7 +227,7 @@ export const useEmbedTheme = () => {
|
||||
|
||||
/**
|
||||
* It serves following purposes
|
||||
* - Gives consistent values for ui config even after Soft Navigation. When a new React component mounts, it would ensure that the component get's the correct value of ui config
|
||||
* - Gives consistent values for ui config even after Soft Navigation. When a new React component mounts, it would ensure that the component gets the correct value of ui config
|
||||
* - Ensures that all the components using useEmbedUiConfig are updated when ui config changes. It is done by maintaining a list of all non-stale setters.
|
||||
*/
|
||||
export const useEmbedUiConfig = () => {
|
||||
@@ -243,7 +243,7 @@ export const useEmbedUiConfig = () => {
|
||||
return uiConfig;
|
||||
};
|
||||
|
||||
// TODO: Make it usable as an attribute directly instead of styles value. It would allow us to go beyond styles e.g. for debugging we can add a special attribute indentifying the element on which UI config has been applied
|
||||
// TODO: Make it usable as an attribute directly instead of styles value. It would allow us to go beyond styles e.g. for debugging we can add a special attribute identifying the element on which UI config has been applied
|
||||
export const useEmbedStyles = (elementName: keyof EmbedStyles) => {
|
||||
const [, setStyles] = useState<EmbedStyles>({});
|
||||
|
||||
@@ -485,7 +485,7 @@ function keepParentInformedAboutDimensionChanges() {
|
||||
|
||||
// During first render let iframe tell parent that how much is the expected height to avoid scroll.
|
||||
// Parent would set the same value as the height of iframe which would prevent scroll.
|
||||
// On subsequent renders, consider html height as the height of the iframe. If we don't do this, then if iframe get's bigger in height, it would never shrink
|
||||
// On subsequent renders, consider html height as the height of the iframe. If we don't do this, then if iframe gets bigger in height, it would never shrink
|
||||
const iframeHeight = isFirstTime ? documentScrollHeight : contentHeight;
|
||||
const iframeWidth = isFirstTime ? documentScrollWidth : contentWidth;
|
||||
embedStore.parentInformedAboutContentHeight = true;
|
||||
|
||||
@@ -132,7 +132,7 @@ function withColorScheme(
|
||||
// https://fvsch.com/transparent-iframes#:~:text=the%20resolution%20was%3A-,If%20the%20color%20scheme%20of%20an%20iframe%20differs%20from%20embedding%20document%2C%20iframe%20gets%20an%20opaque%20canvas%20background%20appropriate%20to%20its%20color%20scheme.,-So%20the%20dark
|
||||
if (!config["ui.color-scheme"]) {
|
||||
const colorScheme = getColorScheme(containerEl);
|
||||
// Only handle two color-schemes for now. We don't want to have unintented affect by always explicitly adding color-scheme
|
||||
// Only handle two color-schemes for now. We don't want to have unintended affect by always explicitly adding color-scheme
|
||||
if (colorScheme) {
|
||||
config["ui.color-scheme"] = colorScheme;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ export class Cal {
|
||||
// But it's okay to do it here for now because the embedded calLink also keeps itself hidden till it receives `parentKnowsIframeReady` message(It has it's own reasons for that)
|
||||
// Once the embedded calLink starts not hiding the document, we should optimize this line to make the iframe visible earlier than this.
|
||||
|
||||
// Imp: Don't use visiblity:visible as that would make the iframe show even if the host element(A paren tof the iframe) has visiblity:hidden set. Just reset the visibility to default
|
||||
// Imp: Don't use visibility:visible as that would make the iframe show even if the host element(A paren tof the iframe) has visibility:hidden set. Just reset the visibility to default
|
||||
this.iframe.style.visibility = "";
|
||||
}
|
||||
this.doInIframe({ method: "parentKnowsIframeReady" } as const);
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useState } from "react";
|
||||
import ReactDom from "react-dom";
|
||||
|
||||
// Because we don't import from @calcom/embed-react, this file isn't able to test if the build is successful or not and thus npm package would work or not correctly.
|
||||
// There are tests in test/built which verifiy that the types from built package are correctly generated and exported correctly.
|
||||
// There are tests in test/built which verify that the types from built package are correctly generated and exported correctly.
|
||||
import Cal, { getCalApi, type EmbedEvent } from "./src/index";
|
||||
|
||||
const api = getCalApi({
|
||||
|
||||
@@ -18,7 +18,7 @@ test("Check that the API is available", async () => {
|
||||
calLink: "free",
|
||||
config: {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error We are intentionaly testing invalid value
|
||||
// @ts-expect-error We are intentionally testing invalid value
|
||||
layout: "wrongview",
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user