diff --git a/src/components/ToolTipTerm/ToolTipText.js b/src/components/ToolTipTerm/ToolTipText.js deleted file mode 100644 index b8a73b0996..0000000000 --- a/src/components/ToolTipTerm/ToolTipText.js +++ /dev/null @@ -1,133 +0,0 @@ -import React, { useState, useRef, useEffect } from 'react'; - -const ToolTipText = ({ term, tooltip }) => { - const [isOpen, setIsOpen] = useState(false); // Tooltip is closed by default - const [isClosingByButton, setIsClosingByButton] = useState(false); // Track if it's closing by button - const tooltipRef = useRef(null); - const termRef = useRef(null); - - // Open the tooltip with animation after 0.1s pause - const openTooltip = () => { - setTimeout(() => { - setIsOpen(true); // Open the tooltip after the delay - }, 100); // 0.1s pause before opening - }; - - // Close the tooltip instantly (no animation) when clicked outside or on term - const closeTooltipInstantly = () => { - setIsOpen(false); // Instantly close the tooltip - setIsClosingByButton(false); // Reset the closing button flag - }; - - // Close the tooltip with animation when "Done" is clicked - const closeTooltipWithAnimation = () => { - setIsClosingByButton(true); // Mark as closing by button - setIsOpen(false); // Trigger animation by changing state - }; - - // Add event listener to close the tooltip when clicking outside - useEffect(() => { - const handleClickOutside = (event) => { - if ( - tooltipRef.current && - !tooltipRef.current.contains(event.target) && - termRef.current && - !termRef.current.contains(event.target) - ) { - closeTooltipInstantly(); // Close instantly when clicking outside - } - }; - - document.addEventListener('click', handleClickOutside); - - return () => { - document.removeEventListener('click', handleClickOutside); // Clean up the listener on component unmount - }; - }, []); - - return ( - - {/* Term with blue color and underlined */} - - {term} - - - {/* Tooltip Message */} - {isOpen && ( - - )} - - ); -}; - -export default ToolTipText; diff --git a/src/components/elements/RelatedRead/RelatedReadList.js b/src/components/elements/RelatedRead/RelatedReadList.js deleted file mode 100644 index d34382034e..0000000000 --- a/src/components/elements/RelatedRead/RelatedReadList.js +++ /dev/null @@ -1,229 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import Link from "@docusaurus/Link"; -import {v4 as uuidv4} from "uuid"; - -export function RelatedReadContainer({children}) { - let rl = []; - if (React.Children.count(children) > 1) { - React.Children.forEach(children, function (child) { - let id = uuidv4(); - rl.push({id: id, child: child}); - }); - } - return ( -
- Related 📚 - {rl.length > 1 ? ( - - ) : ( - children - )} -
- ); -} - -export function RelatedReadItem({page, children}) { - const { - frontMatter, - metadata, - // contentTitle // doesnt seem to work yet - } = page; - // console.log({ frontMatter, metadata }) - // identify tags - let tagClass, tag; - for (const t of frontMatter.tags) { - if ( - [ - "developer-guide", - "operation-guide", - "tutorial", - "explanation", - "reference", - ].includes(t) - ) { - tag = t; - tagClass = "archetype-tag-" + t; - } - } - return ( - <> - - {children || frontMatter.title} - - - {tag} - - - ); -} - -export function Preview({ - className, - page: { - frontMatter, - metadata, - // contentTitle // doesnt seem to work yet - }, - children, -}) { - const [show, setShow] = React.useState(false); - return ( - setShow(true)} - onMouseLeave={() => setShow(false)} - style={{position: "relative", display: "inline-block"}} - > - - {children} - - - {show && ( -
-
- {frontMatter.title} -
-
- {metadata.description} - - - see full article >> - - -
-
- )} -
- ); -} - -function InfoIcon() { - return ( - - - - - - ); -} - -// TODO - delete everything below this line once we deprecate - -export default function RelatedReadList({readlist}) { - let readingList = []; - for (const item of readlist) { - const tagStuff = tagInfo(item[2]); - if (tagStuff instanceof Error) throw tagStuff; - // form data structure - readingList.push({ - id: uuidv4(), - text: item[0], - goTo: item[1], - tag: tagStuff.tag, - tagClass: tagStuff.tagClass, - }); - } - if (readingList.length == 1) { - return ( -
- Related 📚 - {readingList.map(({id, text, goTo, tag, tagClass}) => ( - - - {text} - - - {tag} - - - ))} -
- ); - } else { - return ( -
- Related 📚 - -
- ); - } -} - -function tagInfo(tag) { - var tagClass; - switch (tag) { - case "developer guide": - tagClass = "archetype-tag-developer-guide"; - break; - case "operation guide": - tagClass = "archetype-tag-operation-guide"; - break; - case "tutorial": - tagClass = "archetype-tag-tutorial"; - break; - case "explanation": - tagClass = "archetype-tag-explanation"; - break; - case "reference": - tagClass = "archetype-tag-reference"; - break; - default: - return new Error("unrecognized tag: " + tag); - } - return {tag: tag, tagClass: tagClass}; -} diff --git a/src/components/elements/RelatedRead/index.js b/src/components/elements/RelatedRead/index.js index d573b6e4b8..802439eb85 100644 --- a/src/components/elements/RelatedRead/index.js +++ b/src/components/elements/RelatedRead/index.js @@ -1,2 +1 @@ export { RelatedReadContainer, RelatedReadItem } from './RelatedRead' -export * from './RelatedReadList' \ No newline at end of file diff --git a/src/components/elements/Tile/TileGrid.tsx b/src/components/elements/Tile/TileGrid.tsx deleted file mode 100644 index f55c148208..0000000000 --- a/src/components/elements/Tile/TileGrid.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import clsx from 'clsx'; -import Tile, { TileProps } from './Tile'; - -export type TileGridProps = { - items: (TileProps & { key?: string })[]; - className?: string; -}; - -export default function TileGrid({ items, className }: TileGridProps) { - return ( -
- {items.map((it) => ( -
- -
- ))} -
- ); -} diff --git a/src/components/elements/Tile/index.js b/src/components/elements/Tile/index.js index 15fb8d85d9..bcdfc04923 100644 --- a/src/components/elements/Tile/index.js +++ b/src/components/elements/Tile/index.js @@ -1,2 +1 @@ export { default as Tile } from './Tile' -export { default as TileGrid } from './TileGrid' \ No newline at end of file diff --git a/static/pdf/Temporal-Terms-of-Service-6-7-22.pdf b/static/pdf/Temporal-Terms-of-Service-6-7-22.pdf deleted file mode 100644 index b867ad114b..0000000000 Binary files a/static/pdf/Temporal-Terms-of-Service-6-7-22.pdf and /dev/null differ diff --git a/static/pdf/Temporal-Terms-of-Service-9-1-22.pdf b/static/pdf/Temporal-Terms-of-Service-9-1-22.pdf deleted file mode 100644 index 56e464a8b5..0000000000 Binary files a/static/pdf/Temporal-Terms-of-Service-9-1-22.pdf and /dev/null differ diff --git a/static/pdf/Temporal-Terms-of-Service-9-9-22.pdf b/static/pdf/Temporal-Terms-of-Service-9-9-22.pdf deleted file mode 100644 index 488708f971..0000000000 Binary files a/static/pdf/Temporal-Terms-of-Service-9-9-22.pdf and /dev/null differ diff --git a/static/pdf/Temporal_Terms_of_Service_8-30-22.pdf b/static/pdf/Temporal_Terms_of_Service_8-30-22.pdf deleted file mode 100644 index 8e3bce6324..0000000000 Binary files a/static/pdf/Temporal_Terms_of_Service_8-30-22.pdf and /dev/null differ diff --git a/static/pdf/datadog-database-reliability.pdf b/static/pdf/datadog-database-reliability.pdf deleted file mode 100644 index ae8d8ee9f6..0000000000 Binary files a/static/pdf/datadog-database-reliability.pdf and /dev/null differ diff --git a/static/pdf/temporal-tos-2021-01-19.pdf b/static/pdf/temporal-tos-2021-01-19.pdf deleted file mode 100644 index 6260ff8956..0000000000 Binary files a/static/pdf/temporal-tos-2021-01-19.pdf and /dev/null differ diff --git a/static/pdf/temporal-tos-2021-07-24.pdf b/static/pdf/temporal-tos-2021-07-24.pdf deleted file mode 100644 index 71eb42ccd8..0000000000 Binary files a/static/pdf/temporal-tos-2021-07-24.pdf and /dev/null differ diff --git a/static/pdf/zebra-medical-case-study.pdf b/static/pdf/zebra-medical-case-study.pdf deleted file mode 100644 index 00ce88c125..0000000000 Binary files a/static/pdf/zebra-medical-case-study.pdf and /dev/null differ