@@ -45,7 +45,6 @@ RUN npm prune --production
|
||||
FROM all_deps as builder
|
||||
|
||||
COPY stylesheets ./stylesheets
|
||||
COPY pages ./pages
|
||||
COPY components ./components
|
||||
COPY lib ./lib
|
||||
COPY src ./src
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -123,7 +123,7 @@ export const DefaultLayout = (props: Props) => {
|
||||
|
||||
{props.children}
|
||||
</main>
|
||||
<footer>
|
||||
<footer data-container="footer">
|
||||
<SupportSection />
|
||||
<LegalFooter />
|
||||
<ScrollButton
|
||||
|
||||
@@ -26,6 +26,7 @@ export const ArticleGridLayout = ({
|
||||
{topper && <Box gridArea="topper">{topper}</Box>}
|
||||
{toc && (
|
||||
<Box
|
||||
data-container="toc"
|
||||
gridArea="sidebar"
|
||||
alignSelf="flex-start"
|
||||
className={cx(styles.sidebarBox, 'border-bottom border-lg-0 pb-4 mb-5 pb-xl-0 mb-xl-0')}
|
||||
@@ -40,7 +41,7 @@ export const ArticleGridLayout = ({
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box gridArea="content" data-search="article-body">
|
||||
<Box data-container="article" gridArea="content" data-search="article-body">
|
||||
{supportPortalVaIframeProps &&
|
||||
supportPortalVaIframeProps.supportPortalUrl &&
|
||||
supportPortalVaIframeProps.vaFlowUrlParameter && (
|
||||
|
||||
@@ -41,6 +41,7 @@ export const ArticleInlineLayout = ({
|
||||
|
||||
{toc && (
|
||||
<Box
|
||||
data-container="toc"
|
||||
gridArea="sidebar"
|
||||
alignSelf="flex-start"
|
||||
className={cx(styles.sidebarBox, 'border-bottom border-lg-0 pb-4 mb-5 pb-xl-0 mb-xl-0')}
|
||||
@@ -50,6 +51,7 @@ export const ArticleInlineLayout = ({
|
||||
)}
|
||||
|
||||
<Box
|
||||
data-container="article"
|
||||
gridArea="content"
|
||||
data-search="article-body"
|
||||
className={cx(styles.articleContainer, className)}
|
||||
|
||||
@@ -142,6 +142,7 @@ export const Header = () => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
data-container="header"
|
||||
className={cx(
|
||||
'border-bottom d-unset color-border-muted no-print z-3 color-bg-default',
|
||||
styles.header,
|
||||
|
||||
@@ -3,7 +3,6 @@ import { TreeView } from '@primer/react'
|
||||
|
||||
import { Link } from 'components/Link'
|
||||
import { ProductTreeNode } from 'components/context/MainContext'
|
||||
import { EventType, sendEvent } from 'src/events/components/events'
|
||||
|
||||
type SectionProps = {
|
||||
routePath: string
|
||||
@@ -25,11 +24,6 @@ export const ProductCollapsibleSection = (props: SectionProps) => {
|
||||
current={isCurrent}
|
||||
defaultExpanded={isCurrent}
|
||||
onSelect={(e) => {
|
||||
sendEvent({
|
||||
type: EventType.navigate,
|
||||
navigate_label: `product page navigate to: ${page.href}`,
|
||||
})
|
||||
|
||||
if (e.nativeEvent instanceof KeyboardEvent && e.nativeEvent.code === 'Enter') {
|
||||
document.getElementById(page.href)?.click()
|
||||
e?.stopPropagation()
|
||||
|
||||
@@ -20,6 +20,7 @@ export const SidebarNav = ({ variant = 'full' }: Props) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
data-container="nav"
|
||||
className={cx(variant === 'full' ? 'position-sticky d-none border-right d-xxl-block' : '')}
|
||||
style={{ width: 326, height: 'calc(100vh - 65px)', top: '65px' }}
|
||||
>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
launch: process.env.GITHUB_ACTIONS ? { executablePath: 'google-chrome-stable' } : {},
|
||||
}
|
||||
@@ -38,8 +38,8 @@ import earlyAccessLinks from '#src/early-access/middleware/early-access-links.js
|
||||
import categoriesForSupport from './categories-for-support.js'
|
||||
import triggerError from '#src/observability/middleware/trigger-error.js'
|
||||
import secretScanning from './contextualizers/secret-scanning.js'
|
||||
import ghesReleaseNotes from './contextualizers/ghes-release-notes.js'
|
||||
import ghaeReleaseNotes from './contextualizers/ghae-release-notes.js'
|
||||
import ghesReleaseNotes from '#src/release-notes/middleware/ghes-release-notes.js'
|
||||
import ghaeReleaseNotes from '#src/release-notes/middleware/ghae-release-notes.js'
|
||||
import whatsNewChangelog from './contextualizers/whats-new-changelog.js'
|
||||
import layout from './contextualizers/layout.js'
|
||||
import currentProductTree from './contextualizers/current-product-tree.js'
|
||||
|
||||
221
package-lock.json
generated
221
package-lock.json
generated
@@ -57,7 +57,7 @@
|
||||
"lodash-es": "^4.17.21",
|
||||
"lowdb": "6.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"mdast-util-to-hast": "^12.3.0",
|
||||
"mdast-util-to-hast": "^13.0.1",
|
||||
"mdast-util-to-markdown": "2.0.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"morgan": "^1.10.0",
|
||||
@@ -3147,6 +3147,11 @@
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
|
||||
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ=="
|
||||
},
|
||||
"node_modules/abbrev": {
|
||||
"version": "1.1.1",
|
||||
"dev": true,
|
||||
@@ -10035,12 +10040,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-definitions": {
|
||||
"version": "5.1.0",
|
||||
"license": "MIT",
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz",
|
||||
"integrity": "sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^3.0.0",
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-visit": "^3.0.0"
|
||||
"unist-util-visit": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -10048,12 +10054,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-definitions/node_modules/unist-util-visit": {
|
||||
"version": "3.1.0",
|
||||
"license": "MIT",
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz",
|
||||
"integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0",
|
||||
"unist-util-visit-parents": "^4.0.0"
|
||||
"unist-util-visit-parents": "^5.1.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -10061,8 +10068,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents": {
|
||||
"version": "4.1.1",
|
||||
"license": "MIT",
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz",
|
||||
"integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0"
|
||||
@@ -10847,45 +10855,135 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast": {
|
||||
"version": "12.3.0",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz",
|
||||
"integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==",
|
||||
"version": "13.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.0.1.tgz",
|
||||
"integrity": "sha512-ka3PknAg27U8ay/v8p+uYcN5bdwjqoAtPF78neohOLaJKhwnuQsp7MAJM3LnMgQ/LABDbK9jwhkVZp7uCLkOMQ==",
|
||||
"dependencies": {
|
||||
"@types/hast": "^2.0.0",
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-definitions": "^5.0.0",
|
||||
"micromark-util-sanitize-uri": "^1.1.0",
|
||||
"@types/hast": "^3.0.0",
|
||||
"@types/mdast": "^4.0.0",
|
||||
"@ungap/structured-clone": "^1.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"micromark-util-sanitize-uri": "^2.0.0",
|
||||
"trim-lines": "^3.0.0",
|
||||
"unist-util-generated": "^2.0.0",
|
||||
"unist-util-position": "^4.0.0",
|
||||
"unist-util-visit": "^4.0.0"
|
||||
"unist-util-position": "^5.0.0",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/unist-util-visit": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz",
|
||||
"integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==",
|
||||
"node_modules/mdast-util-to-hast/node_modules/@types/hast": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.0.tgz",
|
||||
"integrity": "sha512-SoytUJRuf68HXYqcXicQIhCrLQjqeYU2anikr4G3p3Iz+OZO5QDQpDj++gv+RenHsnUBwNZ2dumBArF8VLSk2Q==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0",
|
||||
"unist-util-visit-parents": "^5.1.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz",
|
||||
"integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==",
|
||||
"node_modules/mdast-util-to-hast/node_modules/@types/mdast": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.0.tgz",
|
||||
"integrity": "sha512-YLeG8CujC9adtj/kuDzq1N4tCDYKoZ5l/bnjq8d74+t/3q/tHquJOJKUQXJrLCflOHpKjXgcI/a929gpmLOEng==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0"
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/@types/unist": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz",
|
||||
"integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w=="
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/micromark-util-character": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.0.1.tgz",
|
||||
"integrity": "sha512-3wgnrmEAJ4T+mGXAUfMvMAbxU9RDG43XmGce4j6CwPtVxB3vfwXSZ6KhFwDzZ3mZHhmPimMAXg71veiBGzeAZw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/micromark-util-encode": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz",
|
||||
"integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/micromark-util-sanitize-uri": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz",
|
||||
"integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-encode": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/micromark-util-symbol": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz",
|
||||
"integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/micromark-util-types": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz",
|
||||
"integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "GitHub Sponsors",
|
||||
"url": "https://github.com/sponsors/unifiedjs"
|
||||
},
|
||||
{
|
||||
"type": "OpenCollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/mdast-util-to-hast/node_modules/unist-util-position": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz",
|
||||
"integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^3.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -14193,6 +14291,52 @@
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-rehype/node_modules/mdast-util-to-hast": {
|
||||
"version": "12.3.0",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz",
|
||||
"integrity": "sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==",
|
||||
"dependencies": {
|
||||
"@types/hast": "^2.0.0",
|
||||
"@types/mdast": "^3.0.0",
|
||||
"mdast-util-definitions": "^5.0.0",
|
||||
"micromark-util-sanitize-uri": "^1.1.0",
|
||||
"trim-lines": "^3.0.0",
|
||||
"unist-util-generated": "^2.0.0",
|
||||
"unist-util-position": "^4.0.0",
|
||||
"unist-util-visit": "^4.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-rehype/node_modules/unist-util-visit": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz",
|
||||
"integrity": "sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0",
|
||||
"unist-util-visit-parents": "^5.1.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-rehype/node_modules/unist-util-visit-parents": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz",
|
||||
"integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==",
|
||||
"dependencies": {
|
||||
"@types/unist": "^2.0.0",
|
||||
"unist-util-is": "^5.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/repeat-string": {
|
||||
"version": "1.6.1",
|
||||
"license": "MIT",
|
||||
@@ -15863,8 +16007,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/unist-util-generated": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz",
|
||||
"integrity": "sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
"lodash-es": "^4.17.21",
|
||||
"lowdb": "6.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"mdast-util-to-hast": "^12.3.0",
|
||||
"mdast-util-to-hast": "^13.0.1",
|
||||
"mdast-util-to-markdown": "2.0.0",
|
||||
"mdast-util-to-string": "^4.0.0",
|
||||
"morgan": "^1.10.0",
|
||||
|
||||
@@ -57,7 +57,6 @@ export enum EventType {
|
||||
hover = 'hover',
|
||||
search = 'search',
|
||||
searchResult = 'searchResult',
|
||||
navigate = 'navigate',
|
||||
survey = 'survey',
|
||||
experiment = 'experiment',
|
||||
preference = 'preference',
|
||||
@@ -77,6 +76,7 @@ type SendEventProps = {
|
||||
exit_scroll_flip?: number
|
||||
link_url?: string
|
||||
link_samesite?: boolean
|
||||
link_container?: string
|
||||
hover_url?: string
|
||||
hover_samesite?: boolean
|
||||
search_query?: string
|
||||
@@ -86,7 +86,6 @@ type SendEventProps = {
|
||||
search_result_total?: number
|
||||
search_result_rank?: number
|
||||
search_result_url?: string
|
||||
navigate_label?: string
|
||||
survey_token?: string // Honeypot, doesn't exist in schema
|
||||
survey_vote?: boolean
|
||||
survey_comment?: string
|
||||
@@ -95,6 +94,7 @@ type SendEventProps = {
|
||||
experiment_variation?: string
|
||||
experiment_success?: boolean
|
||||
clipboard_operation?: string
|
||||
clipboard_target?: string
|
||||
preference_name?: string
|
||||
preference_value?: string
|
||||
}
|
||||
@@ -282,7 +282,11 @@ function initCopyButtonEvent() {
|
||||
const target = evt.target as HTMLElement
|
||||
const button = target.closest('.js-btn-copy') as HTMLButtonElement
|
||||
if (!button) return
|
||||
sendEvent({ type: EventType.navigate, navigate_label: 'copy icon button' })
|
||||
sendEvent({
|
||||
type: EventType.clipboard,
|
||||
clipboard_operation: 'copy',
|
||||
clipboard_target: '.js-btn-copy',
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -292,10 +296,14 @@ function initLinkEvent() {
|
||||
const link = target.closest('a[href]') as HTMLAnchorElement
|
||||
if (!link) return
|
||||
const sameSite = link.origin === location.origin
|
||||
const container = ['header', 'nav', 'article', 'toc', 'footer'].find((name) =>
|
||||
target.closest(`[data-container="${name}"]`),
|
||||
)
|
||||
sendEvent({
|
||||
type: EventType.link,
|
||||
link_url: link.href,
|
||||
link_samesite: sameSite,
|
||||
link_container: container,
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -353,9 +361,4 @@ export function initializeEvents() {
|
||||
initClipboardEvent()
|
||||
initCopyButtonEvent()
|
||||
initPrintEvent()
|
||||
// survey event in ./survey.js
|
||||
// experiment event in ./experiment.js
|
||||
// search and search_result event in ./search.js
|
||||
// redirect event in middleware/record-redirect.js
|
||||
// preference event in ./display-tool-specific-content.js
|
||||
}
|
||||
|
||||
@@ -245,6 +245,11 @@ const link = {
|
||||
type: 'boolean',
|
||||
description: 'If the link stays on docs.github.com.',
|
||||
},
|
||||
link_container: {
|
||||
type: 'string',
|
||||
enum: ['header', 'nav', 'article', 'toc', 'footer'],
|
||||
description: 'The part of the page whwere the user clicked the link.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -334,23 +339,6 @@ const searchResult = {
|
||||
},
|
||||
}
|
||||
|
||||
const navigate = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
required: ['type', 'context'],
|
||||
properties: {
|
||||
context,
|
||||
type: {
|
||||
type: 'string',
|
||||
pattern: '^navigate$',
|
||||
},
|
||||
navigate_label: {
|
||||
type: 'string',
|
||||
description: 'An identifier for where the user is navigating.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const survey = {
|
||||
type: 'object',
|
||||
additionalProperties: false,
|
||||
@@ -419,6 +407,10 @@ const clipboard = {
|
||||
description: 'Which clipboard operation the user is performing.',
|
||||
enum: ['copy', 'paste', 'cut'],
|
||||
},
|
||||
clipboard_target: {
|
||||
type: 'string',
|
||||
description: 'How the user got the contents into their clipboard.',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -496,7 +488,6 @@ export const schemas = {
|
||||
hover,
|
||||
search,
|
||||
searchResult,
|
||||
navigate,
|
||||
survey,
|
||||
experiment,
|
||||
clipboard,
|
||||
@@ -512,7 +503,6 @@ export const hydroNames = {
|
||||
hover: 'docs.v0.HoverEvent',
|
||||
search: 'docs.v0.SearchEvent',
|
||||
searchResult: 'docs.v0.SearchResultEvent',
|
||||
navigate: 'docs.v0.NavigateEvent',
|
||||
survey: 'docs.v0.SurveyEvent',
|
||||
experiment: 'docs.v0.ExperimentEvent',
|
||||
clipboard: 'docs.v0.ClipboardEvent',
|
||||
|
||||
@@ -4,8 +4,6 @@ import type { AppProps, AppContext } from 'next/app'
|
||||
import Head from 'next/head'
|
||||
import { ThemeProvider } from '@primer/react'
|
||||
|
||||
import '../stylesheets/index.scss'
|
||||
|
||||
import { initializeEvents } from 'src/events/components/events'
|
||||
import { initializeExperiments } from 'src/events/components/experiment'
|
||||
import {
|
||||
0
src/learning-track/README.md
Normal file
0
src/learning-track/README.md
Normal file
7
src/pages/README.md
Normal file
7
src/pages/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Pages
|
||||
|
||||
This is the Next.js pages directory.
|
||||
|
||||
See <https://nextjs.org/docs/pages/building-your-application/configuring/src-directory>
|
||||
|
||||
There is almost no code in this directory, instead the actual pages live with their subject siblings. These files directly export from the page files in the relative subjects.
|
||||
1
src/pages/[versionId]/admin/release-notes.tsx
Normal file
1
src/pages/[versionId]/admin/release-notes.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export { default, getServerSideProps } from 'src/release-notes/pages/release-notes'
|
||||
3
src/pages/_app.tsx
Normal file
3
src/pages/_app.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
import 'stylesheets/index.scss'
|
||||
|
||||
export { default } from 'src/frame/pages/app'
|
||||
0
src/release-notes/README.md
Normal file
0
src/release-notes/README.md
Normal file
@@ -1,4 +1,4 @@
|
||||
import { getDataByLanguage, getDeepDataByLanguage } from '../../lib/get-data.js'
|
||||
import { getDataByLanguage, getDeepDataByLanguage } from '../../../lib/get-data.js'
|
||||
|
||||
// If we one day support release-notes for other products, add it here.
|
||||
// Checking against this is only really to make sure there's no typos
|
||||
@@ -1,5 +1,5 @@
|
||||
import { formatReleases, renderPatchNotes } from '../../lib/release-notes-utils.js'
|
||||
import { allVersions } from '../../lib/all-versions.js'
|
||||
import { formatReleases, renderPatchNotes } from '#src/release-notes/lib/release-notes-utils.js'
|
||||
import { allVersions } from '../../../lib/all-versions.js'
|
||||
import { getReleaseNotes } from './get-release-notes.js'
|
||||
|
||||
export default async function ghaeReleaseNotesContext(req, res, next) {
|
||||
@@ -1,6 +1,6 @@
|
||||
import { formatReleases, renderPatchNotes } from '../../lib/release-notes-utils.js'
|
||||
import { all } from '../../lib/enterprise-server-releases.js'
|
||||
import { executeWithFallback } from '../../lib/render-with-fallback.js'
|
||||
import { formatReleases, renderPatchNotes } from '#src/release-notes/lib/release-notes-utils.js'
|
||||
import { all } from '../../../lib/enterprise-server-releases.js'
|
||||
import { executeWithFallback } from '../../../lib/render-with-fallback.js'
|
||||
import { getReleaseNotes } from './get-release-notes.js'
|
||||
|
||||
export default async function ghesReleaseNotesContext(req, res, next) {
|
||||
@@ -4,9 +4,12 @@ import pick from 'lodash/pick'
|
||||
|
||||
import { MainContextT, MainContext, getMainContext } from 'components/context/MainContext'
|
||||
import { DefaultLayout } from 'components/DefaultLayout'
|
||||
import { GHAEReleaseNotes } from 'components/release-notes/GHAEReleaseNotes'
|
||||
import { GHESReleaseNotes } from 'components/release-notes/GHESReleaseNotes'
|
||||
import { GHAEReleaseNotesContextT, GHESReleaseNotesContextT } from 'components/release-notes/types'
|
||||
import { GHAEReleaseNotes } from 'src/release-notes/components/GHAEReleaseNotes'
|
||||
import { GHESReleaseNotes } from 'src/release-notes/components/GHESReleaseNotes'
|
||||
import {
|
||||
GHAEReleaseNotesContextT,
|
||||
GHESReleaseNotesContextT,
|
||||
} from 'src/release-notes/components/types'
|
||||
|
||||
const liquid = new Liquid()
|
||||
type Props = {
|
||||
@@ -1,8 +1,8 @@
|
||||
import { jest } from '@jest/globals'
|
||||
import nock from 'nock'
|
||||
|
||||
import { get, getDOM } from '../helpers/e2etest.js'
|
||||
import enterpriseServerReleases from '../../lib/enterprise-server-releases.js'
|
||||
import { get, getDOM } from '../../../tests/helpers/e2etest.js'
|
||||
import enterpriseServerReleases from '../../../lib/enterprise-server-releases.js'
|
||||
|
||||
jest.useFakeTimers({ legacyFakeTimers: true })
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, jest } from '@jest/globals'
|
||||
|
||||
import enterpriseServerReleases from '../../lib/enterprise-server-releases.js'
|
||||
import { get } from '../helpers/e2etest.js'
|
||||
import Page from '../../lib/page.js'
|
||||
import enterpriseServerReleases from '../../../lib/enterprise-server-releases.js'
|
||||
import { get } from '../../../tests/helpers/e2etest.js'
|
||||
import Page from '../../../lib/page.js'
|
||||
|
||||
// The English content page's `versions:` frontmatter is the source
|
||||
// of (convenient) truth about which versions of this page is available.
|
||||
@@ -4,7 +4,6 @@ import { useState, useEffect } from 'react'
|
||||
import { TreeView } from '@primer/react'
|
||||
|
||||
import { ProductTreeNode } from 'components/context/MainContext'
|
||||
import { EventType, sendEvent } from 'src/events/components/events'
|
||||
import { useAutomatedPageContext } from 'src/automated-pipelines/components/AutomatedPageContext'
|
||||
import type { MiniTocItem } from 'components/context/ArticleContext'
|
||||
import { Link } from 'components/Link'
|
||||
@@ -156,11 +155,6 @@ export const RestCollapsibleSection = (props: SectionProps) => {
|
||||
|
||||
if (prevTarget && prevTarget === currentTarget) {
|
||||
setMapTopicExpanded(!mapTopicExpanded)
|
||||
} else {
|
||||
sendEvent({
|
||||
type: EventType.navigate,
|
||||
navigate_label: `rest page navigate to: ${childPage.href}`,
|
||||
})
|
||||
}
|
||||
|
||||
if (e.nativeEvent instanceof KeyboardEvent && e.nativeEvent.code === 'Enter') {
|
||||
|
||||
Reference in New Issue
Block a user