From 8505229120ff34e19ef210e4c881b7e37a858a3b Mon Sep 17 00:00:00 2001 From: Glen Hunter Date: Thu, 6 Jan 2022 12:51:59 -0500 Subject: [PATCH 1/3] Show guidelines in NxAccordion RSC-843 --- .../NxAccordion/NxAccordionPage.tsx | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/gallery/src/components/NxAccordion/NxAccordionPage.tsx b/gallery/src/components/NxAccordion/NxAccordionPage.tsx index 65bf392453..562179c49d 100644 --- a/gallery/src/components/NxAccordion/NxAccordionPage.tsx +++ b/gallery/src/components/NxAccordion/NxAccordionPage.tsx @@ -5,7 +5,17 @@ * distribution and is available at https://www.eclipse.org/legal/epl-2.0/. */ import React from 'react'; -import { NxTable, NxInfoAlert, NxCode, NxTextLink, NxP, NxH3, NxTile } from '@sonatype/react-shared-components'; +import { + NxTable, + NxInfoAlert, + NxCode, + NxTextLink, + NxP, + NxH3, + NxTile, + NxH2, + NxList +} from '@sonatype/react-shared-components'; import { GalleryDescriptionTile, GalleryExampleTile } from '../../gallery-components/GalleryTiles'; @@ -32,6 +42,35 @@ const NxAccordionPage = () => Note that this component is stateless – its open state must be tracked externally. See NxStatefulAccordion for a version which tracks its own open state. + Guidelines + When to Use + + Displaying and grouping additional information. + Adding granular control over the information on a given page. + Shortening pages to reduce scrolling. + + When Not to Use + + + Displaying critical system information or a primary action to be taken on the page. (for example, + {' '}alerts, confirmation or cancellation buttons). + + + Displaying navigation elements such as tabs. + + + Displaying links pointing to sections of the same page, instead use a + {' '}list. + + + Creating hierarchy levels by nesting them within each other. If you need to add hierarchy to the + content use a tree. + + + Displaying a set of visual components following the same style, prefer using Collapsable.(TODO: Add + link to collapsable). + + NxAccordion From abc48124caa1ceb5bcefb7388edf2f1e2bb35cfd Mon Sep 17 00:00:00 2001 From: Glen Hunter Date: Fri, 7 Jan 2022 10:38:14 -0500 Subject: [PATCH 2/3] Proper subsection for guidelines RSC-843 --- gallery/src/components/NxAccordion/NxAccordionPage.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gallery/src/components/NxAccordion/NxAccordionPage.tsx b/gallery/src/components/NxAccordion/NxAccordionPage.tsx index 562179c49d..f4bff70911 100644 --- a/gallery/src/components/NxAccordion/NxAccordionPage.tsx +++ b/gallery/src/components/NxAccordion/NxAccordionPage.tsx @@ -42,7 +42,10 @@ const NxAccordionPage = () => Note that this component is stateless – its open state must be tracked externally. See NxStatefulAccordion for a version which tracks its own open state. - Guidelines + + + Guidelines + When to Use Displaying and grouping additional information. @@ -71,6 +74,7 @@ const NxAccordionPage = () => link to collapsable). + NxAccordion From d203f326829ba33c839209e7af2bbc22ec5fc290 Mon Sep 17 00:00:00 2001 From: Glen Hunter Date: Fri, 7 Jan 2022 10:55:27 -0500 Subject: [PATCH 3/3] Use NxTextLink RSC-843 --- gallery/src/components/NxAccordion/NxAccordionPage.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery/src/components/NxAccordion/NxAccordionPage.tsx b/gallery/src/components/NxAccordion/NxAccordionPage.tsx index f4bff70911..5d0c761df7 100644 --- a/gallery/src/components/NxAccordion/NxAccordionPage.tsx +++ b/gallery/src/components/NxAccordion/NxAccordionPage.tsx @@ -44,7 +44,7 @@ const NxAccordionPage = () => - Guidelines + Guidelines When to Use @@ -56,18 +56,18 @@ const NxAccordionPage = () => Displaying critical system information or a primary action to be taken on the page. (for example, - {' '}alerts, confirmation or cancellation buttons). + {' '}alerts, confirmation or cancellation buttons). Displaying navigation elements such as tabs. Displaying links pointing to sections of the same page, instead use a - {' '}list. + {' '}list. Creating hierarchy levels by nesting them within each other. If you need to add hierarchy to the - content use a tree. + content use a tree. Displaying a set of visual components following the same style, prefer using Collapsable.(TODO: Add