-
Notifications
You must be signed in to change notification settings - Fork 3
Move annotations to markdown file #33
Description
I'm not sure if this is the exact right place to discuss this, but as I've been cleaning up the UI layer, I've been thinking about the role of annotations and how they might be able to be revised and/or moved or perhaps even removed in order to be more useful.
Current Implementation
The current implementation of annotations involves a file called source/_annotations/anntations.js
. Within the annotations file, we can define an annotation like so:
{
"el": ".c-header",
"title": "Masthead",
"comment": "The main header of the site doesn't take up too much screen real estate in order to keep the focus on the core content. It's using a linear CSS gradient instead of a background image to give greater design flexibility and reduce HTTP requests."
}
Are annotations needed?
The first question I'll ask is "do annotations need to exist?" What I mean by this is "are annotations fundamentally different than the base pattern definition/documentation?" If the answer to that is no, then annotations could be eliminated, and rather than showing distinct annotations, we could expose each child pattern's description/documentation in this view:
If annotations are indeed distinct from pattern description, then we should think about how to integrate annotations that into the formats and locations that we're standardizing on.
Format and location
So rather than the current implementation I'd propose something like this:
---
title: Masthead
element: .c-header
annotation: The main header of the site doesn't take up too much screen real estate in order to keep the focus on the core content. It's using a linear CSS gradient instead of a background image to give greater design flexibility and reduce HTTP requests.
---
Pattern description/documentation
I think this makes sense as we're moving all documentation and info around a specific pattern into markdown. That means we can remove the source/_annotations/anntations.js
file and have everything under one roof.
Questions
- Are annotations fundamentally different than pattern description/documentation?
- Where should annotations live?
- How should annotations behave?
/cc @pattern-lab/voting-members