1
0
mirror of synced 2026-01-15 15:01:34 -05:00

Merge pull request #27572 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2023-08-18 13:33:21 -05:00
committed by GitHub
6 changed files with 18 additions and 22 deletions

View File

@@ -120,9 +120,7 @@ Most of the limits below affect both {% data variables.product.product_name %} a
### Text limits
Text files over **512 KB** are always displayed as plain text. Code is not syntax highlighted, and prose files are not converted to HTML (such as Markdown, AsciiDoc, _etc._).
Text files over **5 MB** are only available through their raw URLs, which are served through `{% data variables.product.raw_github_com %}`; for example, `https://{% data variables.product.raw_github_com %}/octocat/Spoon-Knife/master/index.html`. Click the **Raw** button to get the raw URL for a file.
{% data variables.product.prodname_dotcom %} displays formatted previews of some files, such as Markdown and Mermaid diagrams. {% data variables.product.prodname_dotcom %} always attempts to render these previews if the files are small (generally less than 2 MB), but more complex files may time out and either fall back to plain text or not be displayed at all. These files are always available in their raw formats, which are served through `{% data variables.product.raw_github_com %}`; for example, `https://{% data variables.product.raw_github_com %}/octocat/Spoon-Knife/master/index.html`. Click the **Raw** button to get the raw URL for a file.
### Diff limits

View File

@@ -31,7 +31,11 @@ export function Table({ fields }: Props) {
<p>
<code>{field.name}</code> (
<code>
<Link href={field.href} locale={locale}>
<Link
href={field.href}
locale={locale}
aria-label={[field.name, field.type, 'type definition'].join(' ')}
>
{field.type}
</Link>
</code>

View File

@@ -4,7 +4,6 @@ import { TreeView } from '@primer/react'
import cx from 'classnames'
import { useMainContext } from 'components/context/MainContext'
import { useTranslation } from 'components/hooks/useTranslation'
import { Link } from 'components/Link'
import { RestCollapsibleSection } from 'src/rest/components/RestCollapsibleSection'
import { ProductCollapsibleSection } from 'components/sidebar/ProductCollapsibleSection'
@@ -19,7 +18,6 @@ export const SidebarProduct = () => {
// more "compressed" tree that is as light as possible.
sidebarTree,
} = useMainContext()
const { t } = useTranslation(['products'])
const isRestPage = currentProduct && currentProduct.id === 'rest'
useEffect(() => {
@@ -164,17 +162,9 @@ export const SidebarProduct = () => {
})}
</TreeView>
</div>
<div className="my-3">
<div
role="separator"
aria-hidden="true"
data-view-component="true"
className="mb-3"
></div>
<span data-testid="rest-sidebar-reference" className={cx('f6 pl-3 color-fg-muted')}>
{t('rest.reference.api_reference')}
</span>
</div>
<hr data-testid="rest-sidebar-reference" />
<TreeView>
{restPages.map((childPage, i) => {
const childTitle = childPage.title

View File

@@ -10,8 +10,8 @@
code {
background-color: transparent;
padding: 8px 8px 16px;
max-width: 90vw;
padding: 0.5rem 0.5rem 1rem;
max-width: calc(100vw - 2.5rem);
@include breakpoint(lg) {
max-width: 40vw;

View File

@@ -262,6 +262,7 @@ export function RestCodeSamples({ operation, slug, heading }: Props) {
}}
tabIndex={0}
selected={optionKey === selectedLanguage}
aria-current={optionKey === selectedLanguage}
className="pr-3 mr-0"
sx={{
cursor: 'pointer',
@@ -303,12 +304,12 @@ export function RestCodeSamples({ operation, slug, heading }: Props) {
</div>
{/* Response section */}
<div
<h4
className="mt-5 mb-2 h5"
dangerouslySetInnerHTML={{
__html: displayedExample.response.description || t('rest.reference.response'),
}}
></div>
></h4>
<div className="border rounded-1">
{displayedExample.response.schema ? (

View File

@@ -10,7 +10,10 @@ type RestMethodT = {
export function RestMethod({ verb, requestPath }: RestMethodT) {
// If the path is long, we want to break it up into multiple lines,
// breaking before the / character.
const displayPath = requestPath.length > 25 ? requestPath.replaceAll('/', '<wbr/>/') : requestPath
const displayPath =
requestPath.length > 25
? requestPath.replaceAll('/', '<wbr/>/').replaceAll('_', '_<wbr/>')
: requestPath
return (
<div className={cx(styles.method, 'my-0 text-mono d-flex flex-row flex-items-start ')}>
<span className="IssueLabel IssueLabel--big color-bg-accent-emphasis color-fg-on-emphasis text-uppercase mr-2">