Naming components via 'handle' makes variants two directories deep
See original GitHub issueWe’ve chosen to name each of our components index.njk
and supply the handle
property for Fractal to resolve. This seems to force an unwanted second level of nesting when viewing variants of components:
We only want the top-level ‘Page Description’ in the screenshot above and can’t see a way around it in the docs?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Name and organize components - Figma Help Center
The fastest way to access components in a file is via the Assets panel. To open the Assets panel: Click on the Assets...
Read more >When you should use variants VS creating separate ...
Before variants, the only way we could organize Figma components was using forward slashes or frames to group and nest them together.
Read more >Naming Files, Paths, and Namespaces - Win32 apps
Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory, for example "..\temp.txt"....
Read more >Chapter 4. Organizing and Naming Files and Folders - O'Reilly
Folders are metadata on two levels, one more obvious than the other: The directory structure that your images are stored within becomes metadata...
Read more >Configure build variants | Android Developers
Build variants are the result of Gradle using a specific set of rules to combine settings, code, and resources configured in your build...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@davidpmccormick Ok, what’s happening here is that as far as Fractal is concerned, this is a collection called ‘Page Description’ (the top level folder) with a component inside it called ‘Page Description’. Because the template file has a different name than its folder, Fractal has no way of knowing that they’re associated. Adding a handle allows you to give what would normally be an ‘Index’ component the same name as the folder, but it doesn’t directly associate it. Unfortunately, while this doesn’t help you right now, we’ve got some plans for future updates that should make this easier in future!
Hi @davidpmccormick, apologies we’ve taken so long on this. I’m going to take a look at this today.