Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/namespace tag #65

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

digitalfu
Copy link

Here's what I came up with, I hope the data attribute is acceptable.

@coveralls
Copy link

coveralls commented Jun 4, 2018

Coverage Status

Coverage increased (+0.01%) to 94.986% when pulling 78186a6 on digitalfu:feature/namespace-tag into 9b0fd27 on straker:master.

@straker
Copy link
Owner

straker commented Jun 4, 2018

Awesome. I'll take a look at it more closely later tonight.

@straker
Copy link
Owner

straker commented Jun 7, 2018

Quick question: would the same namespace be something you'd want applied to every example or just a few?

@digitalfu
Copy link
Author

digitalfu commented Jun 7, 2018

My use case right now will require it on every doc item so it could be declared at the project level (as global configuration) but I think it's better if they are defined individually at the doc item level, here's why:

  • Multiple or partial namespaces will be accommodating to less than perfect/legacy systems, a project can progressively migrate from one to another, from none to n, or from n to none.
  • The namespace will be declared as part of the in code documentation, and not just some magical configuration value (inline with the 'living style guide' ideals AFAIK).

Further to that I though it might be nice to show the namespace (when preset) in the UI as a small tag/label on each example.

What are you thinking?

@straker
Copy link
Owner

straker commented Jun 7, 2018

I was just thinking that it might be tedious to remember to add the namespace to every example, otherwise your output is visually broken, but that's just me. The visual label would probably be a good indication of what's missing though, so that might do well as the reminder.

@digitalfu
Copy link
Author

digitalfu commented Jun 7, 2018

We could have both options, global configuration optionally overridden at the example level?

As for the label, I was thinking it would only show up if there was a namespace defined, primarily because I think the large majority of projects wont use them, it would be a distraction most of the time, but I could use the string "Global" when there is none so the namespace is always explicit (in the UI) (only becomes confusing if the creator actually uses a namespace called "Global"). The reminder would then be more for the users of the style guide, reminding them to include the namespace in any implementations that utilize the design system as apposed to the a reminder for the creators of the style guide itself.

Does that change your mind about anything and how would you like me to proceed?

@straker
Copy link
Owner

straker commented Jun 7, 2018

👍 I like it.

A global level would make maintaining the docs a bit easier, and having the ability to override it per example will make it more flexible. I like the visual label for the consumers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants