question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Naming components via 'handle' makes variants two directories deep

See original GitHub issue

We’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:

screen shot 2016-11-29 at 12 13 15

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:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dkhuntrodscommented, Jan 11, 2017

@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!

0reactions
dkhuntrodscommented, Jan 11, 2017

Hi @davidpmccormick, apologies we’ve taken so long on this. I’m going to take a look at this today.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found