Go to the declaration of symfony/ux-css tokens in css()
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start from how the language server resolves go-to-definition for Twig css() hash keys, and from how it reads config/reference_css.php to map a property type such as SpacingToken to a token category. Then check how the project's ux_css configuration (YAML or PHP, including when@dev) and vendor/symfony/ux-css/resources/panda-tokens.json are parsed. Done means a definition request on blue.500 or md returns the project declaration, the default JSON entry, or both when a default is overridden.
Written by the indexing model from the issue text.
Description
Hi 👋🏻
Go to definition on a token in a css() hash should open its declaration under tokens or semantic_tokens in the project's ux_css configuration (YAML or PHP, any file name, also under when@dev). If the project does not declare the token, it should open the default token in vendor/symfony/ux-css/resources/panda-tokens.json, and when the project overrides a default token, both locations are targets.
{{ css({ color: 'blue.500', p: 'md' }) }}
The token category comes from the property type in config/reference_css.php: p?: SpacingToken means md is spacing.md.
This is how it looks in PhpStorm (Haehnchen/idea-php-symfony2-plugin#2906):
https://github.com/user-attachments/assets/bdb0c0eb-fc9b-48d0-8264-944b46c24956
- Dominant language
- PHP
- Stars
- 171
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from symfony/language-tools
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
symfony/language-tools#133 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
symfony/language-tools#132 ·
All issues in symfony/language-tools
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
mailcow/mailcow-dockerized#7668 · 5 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
lara-zeus/spatie-translatable#80 ·
Maintainers usually reply within 1 day
-
small
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
uiowa/uiowa#10296 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
asyncapi/modelina#2709 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
My-Little-Forum/mylittleforum#937 ·