Closed jeffmaher closed 1 year ago
From the GDoc:
This component styles the playbook’s “lightbulb” sections, but it’s extensible to any paragraph we want to give special emphasis.
Here's what I have:
At first, I thought an <aside>
might be appropriate here. But the lightbulb sections seem like they're directly related to the main content: you can't pull them out without losing important context. So I'm just using a <section>
tag instead.
For screen readers, I added a visually hidden <h3>
to distinguish this component from the main content. Alternatively, we could add a title
attribute to the icon SVG.
How might we make this component easy for non-engineers to edit?
Letting authors swap out icons raises some questions here. Where will the icons come from?
I've been using Bootstrap Icons for this project thus far. We could:
bootstrap-icons
NPM package into the guides repo{% callout "This is the content of my callout.", "box2-heart" %}
We could simplify things by:
/assets/
folderWe could move icon customization out of scope.
@jeffmaher @SMakaiTakori Let me know what you think!
Forgot to mention the status of this on my end:
I've committed an example of a Callout to the storybook
branch. I've also created a Nunjucks template locally in an 11ty instance (although we still need to decide upon the component API above.)
I can open a PR with just these components once #5 and #6 are done.
Awaiting review from assignees ( @SMakaiTakori , @jeffmaher )
For screen readers, I added a visually hidden
<h3>
to distinguish this component from the main content. Alternatively, we could add atitle
attribute to the icon SVG.
@jrubenoff If we can, I would prefer to add a title
attribute directly to each SVG rather than the hidden <h3>
just to keep with common accessibility practices.
Component API
How might we make this component easy for non-engineers to edit? Letting authors swap out icons raises some questions here. Where will the icons come from?
Idea 2
We could simplify things by:
- Choosing 3-5 icons we might want to use with callouts
- Adding them to our
/assets/
folder- Mentioning the icon choices in our documentation
@jrubenoff Great ideas! I think we should go with Idea 2. I feel like it would be simpler to store some icon images so that authors can have choices. This will keep it simple for authors while also making it easier to add or swap out images in the future if needed. Thoughts @jeffmaher ?
Question for @jrubenoff and @SMakaiTakori : Would would it look like for a document author to add this into a Markdown file? Would it be the Nunjucks component or some other markup?
@LynnHerrick9 to handle merge conflicts, then done!
@SMakaiTakori will handle these conflicts.
Stories
Notes
Done When