From cf53f2e9d2af23387f6b80b1a6f77bc826ddd684 Mon Sep 17 00:00:00 2001 From: Diego Assencio Date: Wed, 2 Jun 2021 18:16:49 +0200 Subject: [PATCH 1/2] Fix Enterprise Owner controls for GitHub Enterprise Server (#19668) Co-authored-by: hubwriter --- .../managing-users-in-your-enterprise/roles-in-an-enterprise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise.md b/content/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise.md index 29ed554e92..008ba202a4 100644 --- a/content/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise.md +++ b/content/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise.md @@ -26,7 +26,7 @@ For more information about adding people to your enterprise, see "{% if currentV Enterprise owners have complete control over the enterprise and can take every action, including: - Managing administrators -- {% if currentVersion == "free-pro-team@latest" %}Adding and removing {% elsif currentVersion == "github-ae@latest" %}Managing{% endif %} organizations {% if currentVersion == "free-pro-team@latest" %}to and from {% elsif currentVersion == "github-ae@latest" %} in{% endif %} the enterprise +- {% if currentVersion == "free-pro-team@latest" %}Adding and removing {% elsif currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.20" %}Managing{% endif %} organizations {% if currentVersion == "free-pro-team@latest" %}to and from {% elsif currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.20" %} in{% endif %} the enterprise - Managing enterprise settings - Enforcing policy across organizations {% if currentVersion == "free-pro-team@latest" %}- Managing billing settings{% endif %} From e0d9a061a336b449df442f0dc79aab8e6ddf0a61 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Wed, 2 Jun 2021 09:28:39 -0700 Subject: [PATCH 2/2] React category / sub-landing page (#19635) Re-work routes to use GlobalPage, implements TocLanding, bundle of minor cleanup / fixes --- components/Breadcrumbs.tsx | 2 +- components/HeaderNotifications.tsx | 2 +- components/LanguagePicker.tsx | 8 +- components/ScrollButton.tsx | 11 - components/TruncateLines.tsx | 9 +- components/article/ArticleTitle.tsx | 31 +++ components/article/ArticleVersionPicker.tsx | 68 +++-- components/article/PrinterIcon.tsx | 20 ++ components/context/MainContext.tsx | 2 + components/context/ProductLandingContext.tsx | 11 +- components/context/TocLandingContext.tsx | 33 +++ components/landing/FeaturedArticles.tsx | 4 +- components/landing/GuideCards.tsx | 3 +- components/landing/ProductArticlesList.tsx | 2 +- components/landing/ProductLanding.tsx | 64 +++++ components/landing/TableOfContents.tsx | 28 +- components/landing/TocLanding.tsx | 55 ++++ components/product/SidebarProduct.tsx | 254 +++++++++--------- .../[productId]/[...restPage]/index.tsx | 5 + pages/[versionId]/[productId]/index.tsx | 138 +++------- stylesheets/index.scss | 1 + stylesheets/lists.scss | 4 + stylesheets/opacity.scss | 6 + stylesheets/utilities.scss | 7 + 24 files changed, 463 insertions(+), 305 deletions(-) create mode 100644 components/article/ArticleTitle.tsx create mode 100644 components/article/PrinterIcon.tsx create mode 100644 components/context/TocLandingContext.tsx create mode 100644 components/landing/ProductLanding.tsx create mode 100644 components/landing/TocLanding.tsx create mode 100644 pages/[versionId]/[productId]/[...restPage]/index.tsx create mode 100644 stylesheets/utilities.scss diff --git a/components/Breadcrumbs.tsx b/components/Breadcrumbs.tsx index a6cdae79e0..090a1321ae 100644 --- a/components/Breadcrumbs.tsx +++ b/components/Breadcrumbs.tsx @@ -12,7 +12,7 @@ export type BreadcrumbT = { type Props = {} export const Breadcrumbs = (props: Props) => { const router = useRouter() - const pathWithLocale = `/${router.locale}${router.asPath}` + const pathWithLocale = `/${router.locale}${router.asPath.split('?')[0]}` // remove query string const { breadcrumbs } = useMainContext() return ( diff --git a/components/HeaderNotifications.tsx b/components/HeaderNotifications.tsx index 4e6d296af2..735b87576f 100644 --- a/components/HeaderNotifications.tsx +++ b/components/HeaderNotifications.tsx @@ -70,7 +70,7 @@ export const HeaderNotifications = () => { return ( <> {allNotifications.map(({ type, content }, i) => { - const isLast = i !== allNotifications.length - 1 + const isLast = i === allNotifications.length - 1 return (
{ return (
- + {selectedLang.nativeName || selectedLang.name} diff --git a/components/ScrollButton.tsx b/components/ScrollButton.tsx index 7694e9a2ae..a32bd2fc60 100644 --- a/components/ScrollButton.tsx +++ b/components/ScrollButton.tsx @@ -45,17 +45,6 @@ export const ScrollButton = () => { > -
) } diff --git a/components/TruncateLines.tsx b/components/TruncateLines.tsx index 7f29bdb707..f2685ddad1 100644 --- a/components/TruncateLines.tsx +++ b/components/TruncateLines.tsx @@ -8,14 +8,15 @@ type Props = { className?: string } export const TruncateLines = (props: Props) => { - const Component = props.as || 'div' + const { as, maxLines, className, children } = props + const Component = as || 'div' return ( - - {props.children} + + {children}