-
Notifications
You must be signed in to change notification settings - Fork 1
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
LPS-116193 - As a developer I can specify custom tokens so that the style editor provides a form to edit those tokens instead of the Liferay-standard ones #99
Conversation
…on of tokens definition JSON schema
To conserve resources, the PR Tester does not automatically run for every pull. If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed. If your pull was never tested, comment "ci:test" to run the PR Tester for this pull. |
I don't think so... You can only know the scope when you apply a set of variables to a specific element (a site, a page, a widget, a fragment...), so defining the 2 examples:
Does this make sense, @ruben-pulido? Please, let me know if this doesn't answer your question or I missed something |
@jbalsas Thanks for the clarification and the illustrative examples. It makes sense. |
Thanks @ruben-pulido! We will use the provided sample to Provide TokenDefinition for Classic Theme. We will see how to better include We're also waiting on @izaera to re-submit the token-definition modules so we can house the schemas in there. @izaera, maybe you could copy these in there already, so we don't need to do it in an additional step and that way it'd be less likely for Brian to discard it afterwards? /cc @marcoscv-work, @eduardoallegrini, @esanzp, let's prioritize an initial TokenDefinition for Classic so we can get this in asap! 😘 |
Mappings added back to the token definition JSON schema as discussed here |
Thanks @ruben-pulido! #111 includes the token_definition schema but not the token_values. We assumed those would go somewhere else. Can you confirm? If so, I think we can close this one since at least everything's been discussed? |
@jbalsas We'll have to think where to store the token values JSON schema, but we can do that at a later point as part of another task/story. I am OK with closing this issue |
Maybe attach the additional json schemas and samples to the JIRA ticket so we don't lose them? The scope of LPS-116193 might grant that we only get this in this part and leave the values definition for wherever you work on the storage part. |
Closing here, then! Thanks for the work on this @ruben-pulido! (still waiting on brianchandotcom#91387 to be reviewed and merged, though) |
@jbalsas I left a comment on brianchandotcom#91387 since the token-definition.json file and the JSON schema are out of sync there. The token-definition.json file needs to be updated. |
🙈 @izaera, @eduardoallegrini, can you guys please coordinate and update to send a new PR? |
This is a follow-up PR of https://github.com/jbalsas/liferay-portal/pull/2218
I have tried to incorporate all the feedback received in the previous PR:
This PR contains:
A second draft version of the tokens definition JSON Schema file
An example tokens definition JSON file following the tokens definition JSON schema.
A token values JSON Schema file
An example token values JSON file following the token values JSON Schema
(I think it makes sense to start thinking already about how the token values JSON file should look like)
Summary of the most important changes:
cssVariable
has been replaced by a more genericmappings
attribute. I have tried to illustrate how a mapping for a CSS Style Template would look like here (@jbalsas, @izaera)validValues
attribute has been added (@jbalsas, @JorgeFerrer)type
has been split intotype
(with possible valuesBoolean
,Integer
,Number
,String
) andeditorType
(for now only with possible valuesColorPicker
). (@izaera)"label": "key
(@jbalsas, @izaera)tokenSetCategories
has been renamed toTokenCategories
(@JorgeFerrer)"type": "object"
has been explicitly added in the cases where it was missing (@wincent )repeatable
attribute has been removed for now for simplicityOpened questions to clarify:
CSSVariablesProviders
are expected to return a collection ofScopedCSSVariables
objects, each of which has ascope
.Would it make sense to include
outputScope
as an additional property of aMapping
item?Any additional feedback is also greatly appreciated!
//cc @ealonso @victorg1991