From 14ae69782d6cb7e6bbe45487e53167e22f095b9e Mon Sep 17 00:00:00 2001 From: Zack Hawkins Date: Fri, 2 Aug 2024 10:21:22 -0400 Subject: [PATCH] docs: quick and dirty icon update for in progress elements (#1734) * docs: quick and dirty icon update for in progress elements * docs: improve upon the icon placement in sidenav and header * docs: improve upon the icon placement in sidenav and header --------- Co-authored-by: Zack Hawkins Co-authored-by: Steven Spriggs --- CONTRIBUTING_DESIGN.md | 2 +- docs/_data/repoStatus.yaml | 26 ++++++++++++++++++- docs/_includes/layouts/base.njk | 9 +++++++ docs/_includes/layouts/pages/basic.njk | 1 + docs/_includes/layouts/pages/elements.njk | 7 +++-- docs/_includes/layouts/pages/home.njk | 1 + docs/_includes/layouts/pages/tokens.njk | 2 ++ docs/_includes/partials/component/sidenav.njk | 4 ++- 8 files changed, 47 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING_DESIGN.md b/CONTRIBUTING_DESIGN.md index f4a2af1ffc..120057cbe2 100644 --- a/CONTRIBUTING_DESIGN.md +++ b/CONTRIBUTING_DESIGN.md @@ -10,7 +10,7 @@ contributing guide](./CONTRIBUTING_DEV.md#prerequisites) Once set up, run the 11ty development server with the following command: ```bash -npm run watch:docs +npm run serve ``` This will start eleventy and a watch process that will reload the site if `*.njk`, `*.md`, `*.scss`, diff --git a/docs/_data/repoStatus.yaml b/docs/_data/repoStatus.yaml index 55c08846a7..b9619a9cdf 100644 --- a/docs/_data/repoStatus.yaml +++ b/docs/_data/repoStatus.yaml @@ -167,6 +167,18 @@ status: N/A - name: Documentation status: Ready +- name: "Navigation (primary)" + type: "Element" + overallStatus: "Planned" + libraries: + - name: Figma library + status: Planned + - name: RH Elements + status: Planned + - name: RH Shared Libs + status: Planned + - name: Documentation + status: Planned - name: "Navigation Secondary" type: "Element" overallStatus: "Available" @@ -198,11 +210,23 @@ - name: Figma library status: Ready - name: RH Elements - status: Ready + status: Planned - name: WebRH status: Ready - name: Documentation status: Ready +- name: "Progress steps" + type: "Element" + overallStatus: "Available" + libraries: + - name: Figma library + status: Ready + - name: RH Elements + status: Planned + - name: WebRH + status: Ready + - name: Documentation + status: Ready - name: "Skip Link" type: "Element" overallStatus: "New" diff --git a/docs/_includes/layouts/base.njk b/docs/_includes/layouts/base.njk index 8ba7fe5695..696f5ae58b 100644 --- a/docs/_includes/layouts/base.njk +++ b/docs/_includes/layouts/base.njk @@ -1,3 +1,12 @@ +---js +{ + isPlanned: function(repoStatus, name) { + const element = repoStatus.find(element => element.name === name); + return element && element.libraries.find(library => library.name === 'RH Elements').status === "Planned"; + } +} +--- + {%- set extraPageClasses = bodyClasses or "" -%} {%- if title -%} {% set extraPageClasses = extraPageClasses + ' page-' + title | slug -%} diff --git a/docs/_includes/layouts/pages/basic.njk b/docs/_includes/layouts/pages/basic.njk index 51582c7ce9..c125f3596d 100755 --- a/docs/_includes/layouts/pages/basic.njk +++ b/docs/_includes/layouts/pages/basic.njk @@ -5,6 +5,7 @@ importElements: - rh-footer - rh-alert - rh-subnav + - rh-tag --- diff --git a/docs/_includes/layouts/pages/elements.njk b/docs/_includes/layouts/pages/elements.njk index 2c9532cbb4..381df39f6f 100644 --- a/docs/_includes/layouts/pages/elements.njk +++ b/docs/_includes/layouts/pages/elements.njk @@ -5,7 +5,6 @@ eleventyComputed: title: "{{ doc.pageTitle }} | {{ slug | deslugify }}" importElements: - rh-alert - - rh-tag - rh-cta - rh-footer - rh-subnav @@ -13,6 +12,7 @@ eleventyComputed: - rh-table - rh-accordion - rh-badge + - rh-tag - "{{ doc.tagName or element.tagName }}" --- {%- if hasToc %} @@ -56,7 +56,10 @@ eleventyComputed:
0 %}class="has-toc"{% endif %}> -

{{ doc.alias or (slug | deslugify) }}

+ {%- set inProgress = doc.docsPage.manifest -%} + {%- set name = (doc.alias) or (slug | deslugify) %} + {%- set planned = isPlanned(repoStatus, name) %} +

{{ name }}{% if planned %} Planned{% endif %}

{%- set manifest = doc.docsPage.manifest -%} {%- set demos = manifest and manifest.getDemos(doc.docsPage.tagName) -%} {%- set demosUrl -%}/elements/{{ slug }}/demos/{%- endset -%} diff --git a/docs/_includes/layouts/pages/home.njk b/docs/_includes/layouts/pages/home.njk index 559759c2f7..a64774ae82 100755 --- a/docs/_includes/layouts/pages/home.njk +++ b/docs/_includes/layouts/pages/home.njk @@ -3,6 +3,7 @@ layout: layouts/base.njk importElements: - rh-cta - rh-footer + - rh-tag --- {% include 'partials/component/masthead.njk' %} diff --git a/docs/_includes/layouts/pages/tokens.njk b/docs/_includes/layouts/pages/tokens.njk index 306cca7057..5c42328190 100644 --- a/docs/_includes/layouts/pages/tokens.njk +++ b/docs/_includes/layouts/pages/tokens.njk @@ -1,5 +1,7 @@ --- layout: layouts/base.njk +importElements: + - rh-tag ---