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

chore(docs): v3 docs update #617

Merged
merged 11 commits into from
May 12, 2021
Merged

chore(docs): v3 docs update #617

merged 11 commits into from
May 12, 2021

Conversation

dbanksdesign
Copy link
Member

@dbanksdesign dbanksdesign commented May 5, 2021

Issue #, if available: #571 #159 #605

Description of changes: WIP!

  • Renamed "style properties" to "design tokens" (up for discussion, just wanted to see how it felt)
    • Adding tokens and allTokens to the core internal data structure to be consistent with this change. This is purely additional, properties and allProperties still exist and this should not break existing code. Moving forward examples should use tokens rather than properties.
  • properties.md -> tokens.md
  • Updated broken links (linking to "master" branch instead of "main")
  • Updated the examples page with all new examples
  • Added a page on custom parsers
  • Added information about transitive transforms
  • Removed "docs/build_process.md" in favor of "docs/architecture.md" because the content was mostly the same.
  • Cleaned up configuration content
    • Updated language around config file formats and how to define the configuration
    • Added information about configuration attributes and separated it out into sections: top-level config attributes including customization, platform attributes, and file attributes, for readability
  • Cleaning up some spacing and headers in markdown files

Discussion points:

  • "pre-defined" v. "built-in" with respect to pre-defined transforms and formats
  • "design tokens" v. "properties"??
  • "input" and "output" files, or "property files" and "generated files"? (as opposed to "source" files which might be confusing because there are "source" and "include")

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.


## Parsers

Starting in version 3.0, you can define custom parsers to parse property files. This allws you to define your property files in *any* language you like as long as you can write a parser for it.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section needs to be filled out and linked to the properties.md page custom parser section

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build_process and architecture are 90% the same. Decided to remove build_process, open to renaming architecture build_process though if it makes more sense.

README.md Outdated Show resolved Hide resolved
docs/config.md Outdated
----
### Platform

A platform is a collection of configuration that tells Style Dictionary how to transform and format your style properties. You can have as many platforms as you need and you can name them anything, there are no restrictions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A platform is a collection of configuration that tells Style Dictionary how to transform and format your style properties

This is a bit obtuse / hard to parse. I think what is missing is the (obvious) use of a platform?

Maybe something like: "A platform is a group of configuration settings that tells Style Dictionary how to properly transform and format your style properties for output to a specific platform".

Or something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time I read something about a "platform" here, I change it to "build target" in my head to better understand what it means. I have "multiple build targets" for the "Web platform", with Sass, CSS, JSON…

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice @nhoizey! I like "build target"

docs/formats.md Outdated Show resolved Hide resolved
docs/parsers.md Outdated

A custom parser matches design token files based on a file path regular expression. It will get the contents of a file as a string and should return an object of the data.

Custom parsers can be used to keep design token files in YAML, but they can also be used to add extra metadata onto all properties before transforms are run or anything else you can think of modifying on the design tokens before transforms are run.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are trying to share example use cases here, but this is hard to parse and a bit confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to parse. Nice.

docs/transforms.md Outdated Show resolved Hide resolved
docs/transforms.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/transforms.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@dbanksdesign
Copy link
Member Author

Great comments @chazzmoney

Next level shit

@dbanksdesign dbanksdesign changed the title chore(docs): wip docs update chore(docs): v3 docs update May 10, 2021
Copy link
Collaborator

@chazzmoney chazzmoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@dbanksdesign dbanksdesign merged commit 048bbab into 3.0 May 12, 2021
@dbanksdesign dbanksdesign deleted the docs-update-3 branch May 12, 2021 23:08
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