Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Move annotations to markdown file #33

@bradfrost

Description

@bradfrost

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:

screen shot 2017-10-13 at 12 41 34 pm

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

  1. Are annotations fundamentally different than pattern description/documentation?
  2. Where should annotations live?
  3. How should annotations behave?

/cc @pattern-lab/voting-members

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions