Skip to content
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

Extending nested tokens causes 'All tokens must be passed throgh asTokenSpec' error #1455

Closed
wodenx opened this issue Mar 13, 2022 · 0 comments · Fixed by #1483
Closed

Extending nested tokens causes 'All tokens must be passed throgh asTokenSpec' error #1455

wodenx opened this issue Mar 13, 2022 · 0 comments · Fixed by #1483
Labels
bug Something isn't working

Comments

@wodenx
Copy link
Contributor

wodenx commented Mar 13, 2022

STR

  1. Create a token which has another token applied to one of its design keys =without 'as'
  2. Merge into another token using asTOkenSpec

ER

All works.

AR

Error 'all tokens must be passed through asTokenSpec' when the nested token is applied

Root Cause
asTokenSpec uses lodash deep merge, which iterates through enumerable keys. [$TokenSpec is not enumerable, so it is stripped off the nested token.

Solution
Ensue nested tokens are. passed through as

Testing Scope

  • write a unit test to cover the case
  • descope testing of any functionality. will rely on build and test cases to for testing.
@wodenx wodenx added the bug Something isn't working label Mar 13, 2022
wodenx added a commit to wodenx/Bodiless-JS that referenced this issue Mar 24, 2022
@hvanyo hvanyo linked a pull request Mar 24, 2022 that will close this issue
hvanyo added a commit that referenced this issue Apr 4, 2022
* WIP on generic template

* Fix issue with nested tokens (#1455)

* Clean template & start shadow

* Cleanup and renaming

* Some cleanup, remove hero flow container.

* Add gutter to content region

* add copyright

* Fix broken styleguide tokens.

* fix some issues after merge

* Fix lint

* move wrapper

* 8512: Add design keys for testing identifiers

* 8541 Add Breadcrumb placeholder & style

* AESQ-8536 add border to demonstrate contentregion

* 8543 Fix lint & add tailwind

* Correct name of footer styleguide page.

* 8537

* 8549 & 8550

* fix build error

* Add tailwind to cx-flowcontainer

* remove dup of generic template & header/footer

* fix build error

* Single Constrained Flow container & fragments

* Move SiteContraint from Wrapper -> container

* Move breadcrumb over hero/top

* comment out cypress

Co-authored-by: hvanyo <hvanyo@its.jnj.com>
Co-authored-by: tmiraniuk <tmiraniu@its.jnj.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant