Skip to content

Commit

Permalink
fix: nanoid hoisting issue (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
artmsilva authored Mar 13, 2023
1 parent b09995b commit d490b07
Show file tree
Hide file tree
Showing 8 changed files with 217 additions and 4,117 deletions.
1 change: 0 additions & 1 deletion apps/vite-project/public/vite.svg

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";
import { Checkbox } from "@washingtonpost/wpds-ui-kit";
import { useId } from "@react-aria/utils";
import { nanoid } from "nanoid";

export const InputCheckbox = (props) => {
const elementId = useId();
const elementId = nanoid();

return <Checkbox {...props} id={elementId} />;
};
6 changes: 3 additions & 3 deletions build.washingtonpost.com/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"@radix-ui/react-checkbox": "^1.0.0",
"@radix-ui/react-collapsible": "^1.0.0",
"@radix-ui/react-toggle-group": "^1.0.1",
"@react-aria/ssr": "^3.1.0",
"@stitches/react": "1.2.8",
"@washingtonpost/site-components": "7.14.3",
"@washingtonpost/site-footer": "0.11.3",
"@washingtonpost/site-favicons": "^0.1.0",
"@washingtonpost/site-footer": "0.16.0",
"@washingtonpost/site-third-party-scripts": "latest",
"@washingtonpost/tachyons-css": "latest",
"@washingtonpost/wpds-accordion": "1.2.0",
"@washingtonpost/wpds-assets": "^1.17.0",
"@washingtonpost/wpds-kitchen-sink": "1.2.0",
Expand Down
5 changes: 2 additions & 3 deletions build.washingtonpost.com/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import { useRouter } from "next/router";
import { darkModeStyles } from "~/components/DarkModeStyles";
import { PageLayout } from "~/components/Layout";
import { SSRProvider } from "@react-aria/ssr";
import SEO from "../next-seo.config";
import "../public/global.css";

Expand Down Expand Up @@ -84,7 +83,7 @@ function App({ Component, pageProps }) {
const getLayout = Component.getLayout;

return (
<SSRProvider>
<>
<DefaultSeo {...SEO} />
<ThemeProvider
attribute="class"
Expand Down Expand Up @@ -117,7 +116,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
</PageLayout>
)}
</ThemeProvider>
</SSRProvider>
</>
);
}

Expand Down
2 changes: 1 addition & 1 deletion build.washingtonpost.com/pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import NextDocument, { Html, Head, Main, NextScript } from "next/document";
import { getCssText, reset } from "@washingtonpost/wpds-ui-kit";
import { Favicon } from "@washingtonpost/site-components/core/favicon";
import { Favicon } from "@washingtonpost/site-favicons";

/**
* Get the css and reset the internal css representation.
Expand Down
4 changes: 4 additions & 0 deletions build.washingtonpost.com/public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<loc>https://build.washingtonpost.com/components/app-bar</loc>
</url>

<url>
<loc>https://build.washingtonpost.com/components/auto-suggest</loc>
</url>

<url>
<loc>https://build.washingtonpost.com/components/avatar</loc>
</url>
Expand Down
Loading

4 comments on commit d490b07

@vercel
Copy link

@vercel vercel bot commented on d490b07 Mar 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

wpds-ui-kit-vitejs-example – ./apps/vite-project

wpds-ui-kit-vitejs-example.preview.now.washingtonpost.com
wpds-ui-kit-vitejs-example-git-main.preview.now.washingtonpost.com

@vercel
Copy link

@vercel vercel bot commented on d490b07 Mar 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

wpds-ui-kit – ./build.washingtonpost.com

build.washingtonpost.com
wpds-ui-kit.preview.now.washingtonpost.com
wpds-ui-kit-git-main.preview.now.washingtonpost.com

@vercel
Copy link

@vercel vercel bot commented on d490b07 Mar 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

wpds-ui-kit-storybook – ./

wpds-ui-kit-storybook-git-main.preview.now.washingtonpost.com
wpds-ui-kit-storybook.preview.now.washingtonpost.com

@vercel
Copy link

@vercel vercel bot commented on d490b07 Mar 14, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

wpds-ui-kit-vitejs-v2-example – ./apps/vite-v2-project

wpds-ui-kit-viteks-v2-example.preview.now.washingtonpost.com
wpds-ui-kit-viteks-v2-example-git-main.preview.now.washingtonpost.com

Please sign in to comment.