diff --git a/content/repositories/creating-and-managing-repositories/about-repositories.md b/content/repositories/creating-and-managing-repositories/about-repositories.md index f655b7088f..d67ff1d08e 100644 --- a/content/repositories/creating-and-managing-repositories/about-repositories.md +++ b/content/repositories/creating-and-managing-repositories/about-repositories.md @@ -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 diff --git a/src/graphql/components/Table.tsx b/src/graphql/components/Table.tsx index 794a0ff47e..231ea65653 100644 --- a/src/graphql/components/Table.tsx +++ b/src/graphql/components/Table.tsx @@ -31,7 +31,11 @@ export function Table({ fields }: Props) {

{field.name} ( - + {field.type} diff --git a/src/landings/components/SidebarProduct.tsx b/src/landings/components/SidebarProduct.tsx index 479e1677e6..d49903130a 100644 --- a/src/landings/components/SidebarProduct.tsx +++ b/src/landings/components/SidebarProduct.tsx @@ -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 = () => { })} -

- - - {t('rest.reference.api_reference')} - -
+ +
+ {restPages.map((childPage, i) => { const childTitle = childPage.title diff --git a/src/rest/components/RestCodeSamples.module.scss b/src/rest/components/RestCodeSamples.module.scss index 3981221444..a7b6ee1e4f 100644 --- a/src/rest/components/RestCodeSamples.module.scss +++ b/src/rest/components/RestCodeSamples.module.scss @@ -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; diff --git a/src/rest/components/RestCodeSamples.tsx b/src/rest/components/RestCodeSamples.tsx index 6d9a6304f2..f21278b483 100644 --- a/src/rest/components/RestCodeSamples.tsx +++ b/src/rest/components/RestCodeSamples.tsx @@ -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) { {/* Response section */} -
+ >
{displayedExample.response.schema ? ( diff --git a/src/rest/components/RestMethod.tsx b/src/rest/components/RestMethod.tsx index 9b47f4d1a9..4ee69c19b6 100644 --- a/src/rest/components/RestMethod.tsx +++ b/src/rest/components/RestMethod.tsx @@ -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('/', '/') : requestPath + const displayPath = + requestPath.length > 25 + ? requestPath.replaceAll('/', '/').replaceAll('_', '_') + : requestPath return (