RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
98 stars 20 forks source link

[feat]: `<rh-footnote>` ready for development #740

Open marionnegp opened 1 year ago

marionnegp commented 1 year ago

Tag Name

rh-footnote

Purpose

Provides a pattern/component for displaying footnotes. [XD link]

Distinguishing factors

No response

Where will it be used?

End user

Designers and content creators

Intended end use

Properties

Page Builder

Accessibility Features

MVP Requirements

Appearance

Page Layout

Behavior

States

Content

markcaron commented 1 year ago

Docs issue: #744

marionnegp commented 8 months ago

@markcaron, <rh-footnote> needs popover to show the source citation. Should this be moved to another milestone?

bennypowers commented 5 months ago

This looks like a pattern that composed <rh-popover>. I suggest the output from this task be limited to /docs/patterns/footnote/ without publishing any web components. Just to make the consequences of that explicit: implementors would be required to copy the citation information into two places, in the actual page footnotes (after the content) and inline into the popover elements.

marionnegp commented 5 months ago

@bennypowers, can you explain what you mean when you say it composed <rh-popover>? We also don't have popover in RHDS, but `' is very similar.

bennypowers commented 5 months ago

imagine this content

<p>
  This paragraph has two <sup>
    <a href="#footnote-1">[<rh-footnote>
      1
      <div slot="content">A footnote is a reference to auxiliary information on a topic</div>
    </rh-footnode>]</a>
  </sup> footnotes. they both use the <sup>
    <a href="#footnote-2">[<rh-footnote>
      2
      <div slot="content">the footnote element is essentially just a type of popover</div>
    </rh-footnode>]</a>
  </sup>
</p>

<footer id="footnotes">
  <h2>footnotes</h2>
  <ol>
    <li id="footnote-1">A footnote is a reference to auxiliary information on a topic</li>
    <li id="footnote-2">the footnote element is essentially just a type of popover</li>
  </ol>
<footer>

What does footnote do here that popover doesn't do? the page author still has to:

We can imagine a custom element which automatically builds the footnotes in the footer in one of any number of ways, but CMS content authors are likely to prefer to be in control of that themselves, and not use client-side js for that task

This is where I'm coming from when i remarked earlier that it seems to me that "footnote" is really just a special usage of "popover"