-
Notifications
You must be signed in to change notification settings - Fork 566
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
fixed the naming for Sass/Scss in documentation, tests, formats #222
Conversation
I have pushed a commit with a proposed solution to avoid breaking changes: the idea is to have the |
Instead of having a deprecation warning for 'sass/map-' formats, could we have a warning that those formats have moved to 'scss/map-' and say the sass formats will now be sass syntax? I still need to figure out how to do maps in sass syntax... |
@dbanksdesign I have made this very rough test: I have extracted from https://adele.uxpin.com/ the design systems that declare are using Sass (filter in the column "CSS"); they are around 45. I have then checked for all of them which syntax flavor they are using, As you can see (and as I suspected) out of 40 design systems only 1 is using |
# Conflicts: # __tests__/formats/__snapshots__/all.test.js.snap
Hmm I see your point. Thanks for compiling that spreadsheet. Not that we should be comparing style dictionary to theo, but theo does have sass and scss formats. Although they only have scss maps, and not sass maps. I did finally figure out how to write maps in sass syntax: $tokens: (color-background-base: #f0f0f0, color-background-alt: #eeeeee) It has to be on 1 line because of the whitespace syntax I think. That might be why they don't do a sass map format? I guess this discussion brings up a larger point of what is the bar to include transforms and formats in the framework itself? I don't have a good answer for that. I would lean towards including more if they are about language syntax, even if they are less popular languages. If it helps 2 people to not have to write their own format, I would say that is a win. How about this, what if we didn't explicitly say "deprecate" in the warning message, but instead say that those formats moved to 'scss/map-'. We could merge this and then have a larger discussion about what formats should be included? Maybe we could create a new issue relating to sass formats and see the response, if it gets enough we add them in at that point? |
index.js
Outdated
var sass_map_format_warnings = GroupMessages.flush(SASS_MAP_FORMAT_DEPRECATION_WARNINGS).join('\n '); | ||
console.log(chalk.bold.yellow(` | ||
⚠️ DEPRECATION WARNING ️️️️️⚠️ | ||
The formats 'sass/map-***' have been renamed to 'scss/map-***', please update your config accordingly (will be soon removed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to Danny's thoughts, what if this said something like:
The formats 'sass/map-' have been renamed to 'scss/map-', please update your config. In the future 'sass/map-***' formats may output actual SASS instead of SCSS , which may break your current configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the exact right message is - @dbanksdesign thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chazzmoney I like your message. if it's ok for @dbanksdesign I'll update it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do it!
Well, it depends:
I tend to apply the Pareto principle in this kind of cases ;) (also, I have seen too many open-source projects explode (and maintainers go in burnout) because of feature creep). |
Very true. I have talked to some people about the idea of making style dictionary more like webpack, where people can publish extensions/plugins (or in our case transforms/formats/actions) so someone could publish a sass-style-dictionary package that adds sass specific transforms/formats. Then we wouldn't really need to worry about what we include in the core library as much. And actually, the node example PR is the first step to make that happen... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@didoo I merged a bunch of things and the custom-format change caused a small conflict here. Can you update this one? Then we can merge. Sorry for the inconvenience. |
@chazzmoney strange, I pulled upstream/develop and merged it into my branch, and there were no conflicts. can you check if everything is OK now? |
Looks good to me! |
* feat: add registerFilter method (#233) * doc: remove registerTemplate from examples (#232) * feat: add node example (#228) * feat: making include accept an array of globs, like source does (#227) * fix: the naming for Sass/Scss in documentation, tests, formats, fixes #213 (#222) * fix: handle showFileHeader option in androids formats templates, fixes #237 (#243)
Issue #, if available:
#213
Description of changes:
I have renamed the
sass/map-***
formats toscss/map-***
and updated some documentation.We have to consider that this is technically a breaking change, so it's better to consider how to release it. One possibility is to include it in the next "major" release (3.0). One other is to release it as "minor", but show an error message for the users that are using the "old" format name (I don't know if it's possible, maybe someone has better ideas? I'm open to suggestions)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.