-
Notifications
You must be signed in to change notification settings - Fork 28
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-115484 Token definitions API and implementation #91387
Conversation
See liferay-frontend#119 (comment) for more information.
To conserve resources, the PR Tester does not automatically run for forwarded pull requests. |
], | ||
"tokens": [ | ||
{ | ||
"cssVariable": "white", |
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.
@eduardoallegrini @izaera
The mappings to a cssVariable need to adapted to:
{
"editorType": "ColorPicker",
"label": "gray-100",
"mappings": [
{
"type": "cssVariable",
"value": "gray-100"
}
],
"name": "gray100Color",
"tokenCategoryName": "colors",
"tokenSetName": "general",
"type": "String"
}
as discussed here so the token-definition.json file conforms with the updated JSON schema
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.
ok! 😁
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.
ci:close |
I will resend the PR with the chnages and a new service that is needed. |
Forwarded from: liferay-frontend#111 (Took 2
ci:forward
attempts in 1 hour 19 minutes)@izaera
@liferay-frontend
Original pull request comment:
This PR defines the initial token definitions API and implementation. We will iterate on this PR to refine the API and maybe provide more functionality.
Initially we sent #91176 to Brian, but he made some objections which led to a full rework of the PR.
The main reasons to rework the PR were:
So, after reviewing the three points we came up with a model where token definitions are associated to OSGi Bundles alone, not related to themes yet (this PR).
In the future we may provide tools to map from themes to OSGi bundles. Even if the existence of a bundle that contains the theme is not enforced by the portal we can define it as a requisite if you want to use token definitions and nothing would break/become inconsistent.
Also, the current API just lists all available token definitions, but doesn't let you query by any criteria. We may add more methods to the
TokenDefinitionRegistry
service in the future to query token definitions as needed.This PR doesn't modify anything in the UI nor does it execute any code (because nobody uses
TokenDefinitionRegistry
yet). However, I have provided units tests to cover almost all production code.In addition, once we add the
token-definition.json
file in classic-theme, I will test it manually to make sure it runs in production too.✔️ ci:test:stable - 20 out of 20 jobs passed
✔️ ci:test:relevant - 46 out of 46 jobs passed in 1 hour 17 minutes
Click here for more details.
Base Branch:
Branch Name: master
Branch GIT ID: e67026449a8a6dae28fc7a7da27e3ff6a3f780b6
Copied in Private Modules Branch:
Branch Name: master-private
Branch GIT ID: 2d61577aa6a76425e17132e68f5aa901f720a686
ci:test:stable - 20 out of 20 jobs PASSED
20 Successful Jobs:
ci:test:relevant - 46 out of 46 jobs PASSED
46 Successful Jobs:
For more details click here.
✔️ ci:test:sf - 1 out of 1 jobs passed in 3 minutes
Click here for more details.
Base Branch:
Branch Name: master
Branch GIT ID: 76f17290c7dd17e02dbd73c3babb438de273a272
Sender Branch:
Branch Name: LPS-115484
1 out of 1jobs PASSEDBranch GIT ID: 22a8281702d74493785158383631f9a351e322b3
1 Successful Jobs:
For more details click here.