Comments (9)
@coreyvickery let's try a horizontal jump link on component pages. It's a lot of links, so we'd have to reduce the padding/font size of the jump links which isn't ideal, but would be a good test for horizontal jump link styles. It would be easier to integrate than vertical jump links. Thinking right below the title bar.
from red-hat-design-system.
Here's the Spacing page with horizontal jump links, desktop and mobile. I don't know what the status is of the web component, so we may have to use raw code for now. Additional comments welcome here or in the XD.
https://xd.adobe.com/view/2bc4c20e-e89e-4a19-8f6d-172a5a64db36-7e97/
from red-hat-design-system.
See. patternfly/patternfly-elements#1926
TL;DR: before committing to using <pfe-jump-links>
for this I'd like to see if we can improve that element's APIs, namely, to allow it to wrap an existing, server-rendered <nav><ul>
without special classes or markup
from red-hat-design-system.
@coreyvickery the link above (old as it may be) doesn't appear to have specs for TOC/jump links. Please advise
from red-hat-design-system.
@markcaron This seems like a quick win for design unless more work is needed on the dev side. Ronnie or Marionne could easily add jump links to the new Footer component page.
from red-hat-design-system.
From Trello:
Hey ok so this looks p. good
We can apply this in the macros which generate sections for pages, which means there should be little or no change to the existing markup.... with one very important exception:
The problem that we're having is that most or all pages have headings that do not follow an incremental heirarchy. meaning that we could have an
<h2>
followed by an<h4>
with no intervening<h3>
.This causes the plugin which scans for headings and generates the table of contents to fail, because it expects a strict heirarchy. We've discovered that this is strictly-speaking allowed under wcag (w3c/wcag#655) but nonetheless causes problems for our table-of-contents generating plugin.
potential solutions:
1 - refactor docs pages to follow strict heading heirarchy
2 - patch the ToC plugin to accept a looser heirarchy
3 - scrap plugin and try something homebrewIf we go with solution (1), we need the content authors to be involved, since we as developers are uncomfortable making content decisions without them (e.g. "this was an h5, should it be an h2 now, or the child of the previous h3, or what?) in other words - we don't know the intended heirarchy. If header styling (e.g. font size and weight) are an issue, we can solve that with css
if we go with (2), we could get stuck in the weeds
(3), similarly we can't give a solid ETA just yet
and many thanks to @brianferry for his help and input on this
@markcaron says:
definitely a good idea! I don't think it has this feature. I could envision something like:
<rh-table-of-contents headings="h2, h3, h4">Which would nest those as needed.
Kelsey Swanson added on Mar 29
I think that pfe-jump-links is trying to solve too many problems. It has a lot of a11y issues. table of contents is way more useful in general especially for A11y. I recommend we create a table of contents component and possibly remove or really refine pfe-jump-links
from red-hat-design-system.
@dcaryll @markcaron Still think this is needed given the IA updates to the Component section pages? Maybe it still is on the other long Foundation section pages.
from red-hat-design-system.
@kelsS recently drafted a PoC for a table of content component
from red-hat-design-system.
Will revisit having jumping links once new docs IA is complete. This is a good idea.
from red-hat-design-system.
Related Issues (20)
- [bug] `<rh-cta>` focus style HOT 1
- [bug] <rh-alert> excess margin on hidden header
- [fix] `<rh-tag>` — update green border color HOT 1
- [docs] `<rh-accordion>`: add info about accent slot
- [feat] `<rh-health-index>` element
- [bug] `<rh-code-block>` "Show more" action button icon is too large
- [docs] groundwork for version dropdown
- [feat] <rh-site-status>: endpoint attribute to hook the component up to the status.redhat.com API
- [docs]: malformed slot jsdoc HOT 1
- [bug] 'New' `<rh-tag>` stretched on mobile
- [feat] New Figma component for portal navigation HOT 2
- missing `/react` on npm and cdn's like JSPM
- [docs] Add color guidance on using brand red text over gray backgrounds
- [feat] `<rh-announcement>`element HOT 1
- [docs bug] Minor edits to repo status table and checklist on elements pages HOT 1
- [bug] `<rh-tabs>` Wonky unexpected tabbing behavior (roving tab index) in catalog app HOT 4
- [bug] <rh-tooltip> is not appearing on red hat product trial center (ptc) HOT 3
- [docs]: note which elements require icon import maps HOT 1
- [bug] `<rh-tabs>` per axeDevTools: Interactive controls must not be nested
- [bug] tabbing away from `rh-navigation-secondary` on mobile does not close the navigation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from red-hat-design-system.