Grapesjs: [Question] Flag for preservation of unused styles

Created on 18 Apr 2018  路  11Comments  路  Source: artf/grapesjs

Hey @artf,

is there any flag available to leave the unused styles? Referencing to you provided answer here.

Thanks in advance and have a great day.

outdated

Most helpful comment

okay my friends, doing now! Thanks for the feedback and the english lesson!

All 11 comments

Hi @artf ,

Added a basic support for this. Take a look on the #1054 and let me know what do you think

hey @FrciSmrci ,

Just to let you know... I just added support for this for grapesjs. I created a new PR and I'm waiting for Artur's review and approval.

Hey @arthuralmeidap , thanks for the pull request and letting me know. :) Have a great day.

Thanks @arthuralmeidap for the help, in the next release, this option will be available via config.dumpUnusedStyles

@arthuralmeidap @artf Thank you both for the quick reply. :) @artf When could I expect the next release?

@arthuralmeidap @artf I built the dev branch and tested the implementation in my project, for all I can tell when the flag dumpUnusedStyles is set to true it leaves them and when it's set to false it removes them. According to the dumpUnusedStyles naming I would say that this is an mistake? Or am I missing something? 馃槓

hey @FrciSmrci , how are you?

I'm not a native english speaker, maybe the naming is confusing. For me makes sense. What do you think?

For me, when I say: " dump unused styles" , it means export the used + unused styles from the editor.
Is this makes sense for you?

The behaviour is correct. For now when you set as true it should leaves them and you set to false it won't dump the unused styles.

Hey @arthuralmeidap , I'm great thanks for asking. And you? :)

Ohh now I understand what you meant, something like keepUnusedStyles/preserveUnusedStyles. Hmm I read dumpUnusedStyles as dispose them, because dump verb according to the dictionary means dispose of (rubbish, waste, or unwanted material), typically in a careless or hurried way.

Otherwise I'm really grateful for this addition, thank you! You spared me a lot of time.

Yeah generally, if you ever worked with databases, the "dump" is associated with "export", but I agree that this term might sound differently for someone else, so @arthuralmeidap what about renaming it in keepUnusedStyles?

okay my friends, doing now! Thanks for the feedback and the english lesson!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tribulant picture tribulant  路  3Comments

Snarkly picture Snarkly  路  3Comments

YashPrince picture YashPrince  路  3Comments

kickbk picture kickbk  路  3Comments

FlashPapa picture FlashPapa  路  3Comments