mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix crash in token grid view due to tooltip validation (#7887)
The color tokens in grid view have a tooltip which is a map. This is done so the frontend can render: ``` Name: foo Resolved value: #000000 ``` However the validation scheme for tooltips was only accepting functions and strings. --- How to reproduce the original (unreported) crash: * Create a color token * Create a shape, add a fill * Pick a color, chose the Token options * Click on the Grid View Crash: `{:hint "invalid props on component tooltip*\n\n -> 'content' should be a string\n"}` Signed-off-by: Dalai Felinto <dalai@blender.org> Co-authored-by: Dalai Felinto <dalai@blender.org>
This commit is contained in:
@@ -61,6 +61,7 @@ example. It's still usable as before, we just removed the example.
|
|||||||
### :heart: Community contributions (Thank you!)
|
### :heart: Community contributions (Thank you!)
|
||||||
|
|
||||||
- Ensure consistent snap behavior across all zoom levels [Github #7774](https://github.com/penpot/penpot/pull/7774) by [@Tokytome](https://github.com/Tokytome)
|
- Ensure consistent snap behavior across all zoom levels [Github #7774](https://github.com/penpot/penpot/pull/7774) by [@Tokytome](https://github.com/Tokytome)
|
||||||
|
- Fix crash in token grid view due to tooltip validation (by @dfelinto) [Github #7887](https://github.com/penpot/penpot/pull/7887)
|
||||||
|
|
||||||
### :sparkles: New features & Enhancements
|
### :sparkles: New features & Enhancements
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
[:id {:optional true} :string]
|
[:id {:optional true} :string]
|
||||||
[:offset {:optional true} :int]
|
[:offset {:optional true} :int]
|
||||||
[:delay {:optional true} :int]
|
[:delay {:optional true} :int]
|
||||||
[:content [:or fn? :string]]
|
[:content [:or fn? :string map?]]
|
||||||
[:placement {:optional true}
|
[:placement {:optional true}
|
||||||
[:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]])
|
[:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user