diff --git a/client/containers/App/Breadcrumbs/Breadcrumbs.tsx b/client/containers/App/Breadcrumbs/Breadcrumbs.tsx index 1a46f9c3fd..31f1309108 100644 --- a/client/containers/App/Breadcrumbs/Breadcrumbs.tsx +++ b/client/containers/App/Breadcrumbs/Breadcrumbs.tsx @@ -28,10 +28,6 @@ const Breadcrumbs = (props: Props) => { const [newCollectionIsOpen, setNewCollectionIsOpen] = useState(false); const createPubAltchaRef = useRef(null); - // console.log(locationData.path.split('/'), locationData.path.split('/').slice(-1)) - // const modesWithSubmodes = ['discussions', 'reviews', 'pages']; - // const isParentMode = modesWithSubmodes.includes(activeMode); - let title = communityData.title; let avatar = communityData.avatar; let showLockIcon = false; diff --git a/client/containers/App/Breadcrumbs/breadcrumbs.scss b/client/containers/App/Breadcrumbs/breadcrumbs.scss index b1e31eda17..a4c79eeb7b 100644 --- a/client/containers/App/Breadcrumbs/breadcrumbs.scss +++ b/client/containers/App/Breadcrumbs/breadcrumbs.scss @@ -74,6 +74,8 @@ $bp: vendor.$bp-namespace; } } .breadcrumb-actions { + display: flex; + align-items: center; flex: 0 0 auto; .#{$bp}-button { margin-left: 15px; diff --git a/package.json b/package.json index 07b8a5601f..3d86f1e2ff 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "@types/react-dom": "^17.0.9", "@types/styled-components": "^5.1.12", "@types/website-scraper": "^1.2.10", - "altcha": "^2.3.0", "altcha-lib": "^1.4.0", "amqplib": "^0.10.9", @@ -125,7 +124,6 @@ "busboy": "^1.6.0", "camelcase-css": "^2.0.1", "cheerio": "1.0.0-rc.12", - "citation-js": "^0.6.3", "classnames": "^2.2.6", "color": "^3.1.1", @@ -369,6 +367,9 @@ "nodemon", "protobufjs", "validate-with-xmllint" - ] + ], + "patchedDependencies": { + "reakit": "patches/reakit.patch" + } } } diff --git a/patches/reakit.patch b/patches/reakit.patch new file mode 100644 index 0000000000..e88164a9e8 --- /dev/null +++ b/patches/reakit.patch @@ -0,0 +1,61 @@ +diff --git a/es/Portal/Portal.js b/es/Portal/Portal.js +index 25d75dface672490a05ec1e5913edb84f5e07430..312cbbbfcfa70c8cecbbe83252675a7be4fbf1c5 100644 +--- a/es/Portal/Portal.js ++++ b/es/Portal/Portal.js +@@ -13,17 +13,17 @@ function Portal(_ref) { + // https://github.com/reakit/reakit/issues/513 + var context = useContext(PortalContext) || getBodyElement(); + +- var _React$useState = useState(function () { +- if (typeof document !== "undefined") { ++ var _React$useState = useState(null), ++ portal = _React$useState[0], ++ setPortal = _React$useState[1]; ++ ++ useEffect(function () { ++ if (typeof document !== "undefined" && !portal) { + var element = document.createElement("div"); + element.className = Portal.__className; +- return element; +- } // ssr +- +- +- return null; +- }), +- portal = _React$useState[0]; ++ setPortal(element); ++ } ++ }, []); + + useEffect(function () { + if (!portal || !context) return undefined; +diff --git a/lib/Portal/Portal.js b/lib/Portal/Portal.js +index 6fe994a69f5abe35f02a5c9db55a6f9d81405d59..7d6502194a82fb31e30b7076bb844fbea6fc0a2d 100644 +--- a/lib/Portal/Portal.js ++++ b/lib/Portal/Portal.js +@@ -17,17 +17,16 @@ function Portal(_ref) { + // https://github.com/reakit/reakit/issues/513 + var context = React.useContext(PortalContext) || getBodyElement(); + +- var _React$useState = React.useState(function () { +- if (typeof document !== "undefined") { ++ var _React$useState = React.useState(null), ++ portal = _React$useState[0], ++ setPortal = _React$useState[1]; ++ React.useEffect(function () { ++ if (typeof document !== "undefined" && !portal) { + var element = document.createElement("div"); + element.className = Portal.__className; +- return element; +- } // ssr +- +- +- return null; +- }), +- portal = _React$useState[0]; ++ setPortal(element); ++ } ++ }, []); + + React.useEffect(function () { + if (!portal || !context) return undefined; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 36def7b468..8e96111a5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,11 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +patchedDependencies: + reakit: + hash: 31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8 + path: patches/reakit.patch + importers: .: @@ -520,7 +525,7 @@ importers: version: 1.0.9(react@16.14.0) reakit: specifier: 1.0.0-beta.14 - version: 1.0.0-beta.14(react-dom@16.14.0(react@16.14.0))(react@16.14.0) + version: 1.0.0-beta.14(patch_hash=31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8)(react-dom@16.14.0(react@16.14.0))(react@16.14.0) rebound: specifier: ^0.1.0 version: 0.1.0 @@ -23464,11 +23469,11 @@ snapshots: dependencies: picomatch: 2.3.1 - reakit-system@0.7.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(reakit-utils@0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(reakit@1.0.0-beta.14(react-dom@16.14.0(react@16.14.0))(react@16.14.0)): + reakit-system@0.7.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(reakit-utils@0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(reakit@1.0.0-beta.14(patch_hash=31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)): dependencies: react: 16.14.0 react-dom: 16.14.0(react@16.14.0) - reakit: 1.0.0-beta.14(react-dom@16.14.0(react@16.14.0))(react@16.14.0) + reakit: 1.0.0-beta.14(patch_hash=31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8)(react-dom@16.14.0(react@16.14.0))(react@16.14.0) reakit-utils: 0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0) reakit-utils@0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0): @@ -23476,13 +23481,13 @@ snapshots: react: 16.14.0 react-dom: 16.14.0(react@16.14.0) - reakit@1.0.0-beta.14(react-dom@16.14.0(react@16.14.0))(react@16.14.0): + reakit@1.0.0-beta.14(patch_hash=31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8)(react-dom@16.14.0(react@16.14.0))(react@16.14.0): dependencies: body-scroll-lock: 2.7.1 popper.js: 1.16.1 react: 16.14.0 react-dom: 16.14.0(react@16.14.0) - reakit-system: 0.7.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(reakit-utils@0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(reakit@1.0.0-beta.14(react-dom@16.14.0(react@16.14.0))(react@16.14.0)) + reakit-system: 0.7.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(reakit-utils@0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0))(reakit@1.0.0-beta.14(patch_hash=31488077229fe3d19a71c66458b888c58eab18010632a29e3b5c485df77242a8)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)) reakit-utils: 0.7.3(react-dom@16.14.0(react@16.14.0))(react@16.14.0) rebound@0.1.0: {} diff --git a/server/routes/pubDocument.tsx b/server/routes/pubDocument.tsx index c7bf8e8665..d761b34cba 100644 --- a/server/routes/pubDocument.tsx +++ b/server/routes/pubDocument.tsx @@ -142,7 +142,6 @@ const getEnrichedPubData = async (options: EnrichedPubOptions) => { collectionPub.collectionId.startsWith(initialData.locationData.query.readingCollection), ); - console.time('Promise.all: docInfo, edges, subscription, nextCollectionPub'); const [docInfo, edges, subscription, nextCollectionPub] = await Promise.all([ log('getDocInfo', getDocInfo()), log('getPubEdges', getPubEdges(pubData, initialData)),