-
Notifications
You must be signed in to change notification settings - Fork 115
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
Filter icons for render mode #120
Filter icons for render mode #120
Conversation
CONFIG.md
Outdated
renderModeOriginalSuffix: '_original' | ||
# Configure the suffix for filtering Icons and to denote a asset render mode: "template". | ||
# ❗️ It will work, if renderMode have default value isn't "template". Defaults to nil. | ||
renderModeOriginalSuffix: '_template' |
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.
Тут опечатка. Должно быть renderModeTemplateSuffix
.
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.
Может быть убрать этот параметр? Свойство renderMode
обозначает какой режим рендеринга использовать для всех иконок. То есть по умолчанию все иконки будут иметь template режим. Если кто-то хочет у нескольких иконок отключить template режим то он задаст свойство renderModeOriginalSuffix
. Кажется что и renderModeDefaultSuffix
не нужен.
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.
Тут опечатка. Должно быть
renderModeTemplateSuffix
.
Опечатку поправил.
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.
Может быть убрать этот параметр? Свойство
renderMode
обозначает какой режим рендеринга использовать для всех иконок. То есть по умолчанию все иконки будут иметь template режим. Если кто-то хочет у нескольких иконок отключить template режим то он задаст свойствоrenderModeOriginalSuffix
. Кажется что иrenderModeDefaultSuffix
не нужен.
Если цветные иконки расположены в одном файле, они уже имеют свой суффикс (для темной темы) - их будет невозможно отфильтровать, получается нужно задавать через свойство renderMode
для всех и фильтровать через renderModeTemplateSuffix
оставшиеся.
Возможны еще какие-то кейсы и кажется лучше больше параметров для большей гибкости, чем их отсутсвие.
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.
То есть у иконки темной темы будет двойной суффикс: _dark_template
?
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.
Эм, нет.
renderMode = default
Для темной темы будут иконки суффиксом: _dark
ЧБ иконки будут с суффиксом _template
и их будем фильтровать через параметр renderModeTemplateSuffix
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.
Но в CONFIG файле написано что renderModeTemplateSuffix
будет работать только если renderMode = template.
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.
Вроде нет
❗️ It will work, if renderMode have default value isn't "template". Defaults to nil.
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.
Да, сорри, не заметил отрицание isn't
CONFIG.md
Outdated
renderMode: default | ||
# Configure the suffix for filtering Icons and to denote a asset render mode: "default". | ||
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. |
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.
Предлагаю убрать эмоджи. Они отвлекают внимание на себя, хотя эта опция очень редко будет использоваться.
CONFIG.md
Outdated
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. | ||
renderModeDefaultSuffix: '_default' | ||
# Configure the suffix for filtering Icons and to denote a asset render mode: "original". | ||
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. |
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.
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. | |
# It will work when renderMode value is "template". Defaults to nil. |
Кажется вот так будет правильней с т.з. англ. яз.
CONFIG.md
Outdated
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. | ||
renderModeDefaultSuffix: '_default' | ||
# Configure the suffix for filtering Icons and to denote a asset render mode: "original". | ||
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. |
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.
# ❗️ It will work, if renderMode have default value is "template". Defaults to nil. | |
# It will work when renderMode value is "template". Defaults to nil. |
Кажется вот так будет правильней с т.з. англ. яз.
I've released a new version of figma-export with this feature. |
Added 3 new parameters for filtering icons and denote a asset render mode.