@@ -54,28 +54,3 @@ jobs:
|
||||
then
|
||||
gh pr edit $PR --add-reviewer github/docs-engineering
|
||||
fi
|
||||
|
||||
- name: Additional information requested
|
||||
run: |
|
||||
id=9664BE8F1CA3
|
||||
body=$(gh pr view $PR --json body | jq -r .body)
|
||||
append=$(cat <<-EOM
|
||||
|
||||
<!-- $id -->
|
||||
### For engineers
|
||||
|
||||
- **How to test**: {Step by step.}
|
||||
- **How to review**: {What to look for when reviewing.}
|
||||
- **Potential risks**: {Any additional risks this change may introduce.}
|
||||
- **How to monitor**: {Datadog link, etc.}
|
||||
- **How to rollback**: {Any additional information beyond shipping a revert pull request.}
|
||||
- **Accessibility impact**: {Any changes to React components.}
|
||||
|
||||
If this involves manual change, please create a [production change issue](https://github.com/github/docs-engineering/issues/new?labels=engineering&projects=&template=production-config-change.md).
|
||||
EOM
|
||||
)
|
||||
if [[ ! $body =~ $id ]]
|
||||
then
|
||||
body+=$append
|
||||
gh pr edit $PR --body "$body"
|
||||
fi
|
||||
|
||||
@@ -370,14 +370,12 @@ 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}"]`),
|
||||
)
|
||||
const container = target.closest(`[data-container]`) as HTMLElement | null
|
||||
sendEvent({
|
||||
type: EventType.link,
|
||||
link_url: link.href,
|
||||
link_samesite: sameSite,
|
||||
link_container: container,
|
||||
link_container: container?.dataset.container,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -251,7 +251,17 @@ const link = {
|
||||
},
|
||||
link_container: {
|
||||
type: 'string',
|
||||
enum: ['header', 'nav', 'article', 'toc', 'footer'],
|
||||
enum: [
|
||||
'header',
|
||||
'nav',
|
||||
'breadcrumbs',
|
||||
'title',
|
||||
'lead',
|
||||
'notifications',
|
||||
'article',
|
||||
'toc',
|
||||
'footer',
|
||||
],
|
||||
description: 'The part of the page where the user clicked the link.',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@ type Props = {
|
||||
}
|
||||
export const ArticleTitle = ({ children }: Props) => {
|
||||
return (
|
||||
<div className="d-flex flex-items-baseline flex-justify-between">
|
||||
<div className="d-flex flex-items-baseline flex-justify-between" data-container="title">
|
||||
<h1 id="title-h1" className="border-bottom-0">
|
||||
{children}
|
||||
</h1>
|
||||
|
||||
@@ -28,6 +28,7 @@ export const Breadcrumbs = ({ inHeader }: Props) => {
|
||||
data-testid={inHeader ? 'breadcrumbs-header' : 'breadcrumbs-in-article'}
|
||||
className={cx('f5 breadcrumbs', styles.breadcrumbs)}
|
||||
aria-label="Breadcrumb"
|
||||
data-container="breadcrumbs"
|
||||
>
|
||||
<ul>
|
||||
{Object.values(breadcrumbs)
|
||||
|
||||
@@ -84,7 +84,7 @@ export const HeaderNotifications = () => {
|
||||
].filter(ExcludesNull)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div data-container="notifications">
|
||||
{allNotifications.map(({ type, content, onClose }, i) => {
|
||||
const isLast = i === allNotifications.length - 1
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ export function Lead({ children, className, as: Component = 'div', ...restProps
|
||||
return (
|
||||
<Component
|
||||
className={cx('f2 color-fg-muted mb-3', styles.container, className)}
|
||||
data-container="lead"
|
||||
{...restProps}
|
||||
{...(typeof children === 'string'
|
||||
? { dangerouslySetInnerHTML: { __html: children } }
|
||||
|
||||
Reference in New Issue
Block a user