SassDoc / sassdoc

Release the docs!
http://sassdoc.com
MIT License
1.41k stars 56 forks source link

Add visualization for Requires and Used by #435

Closed timschoch closed 8 years ago

timschoch commented 8 years ago

Navigating with the links that are generated for requires and used by is very handy for smaller projects. But with alot of variables it gets messy quickly. By integrating a Tree View (like http://bl.ocks.org/mbostock/4339083) this would be greatly enhanced.

This is our real world scenario: We have a framework with a large set of specific variables that inherit their default value from more general ones. This makes it very fast to create basic stylings. eg Colors:

// specific class inherits value from very general one
(specific class) $topNavColor > $navColor > $linkColor > $corporateColor (general class)

Now there are branches, for example link states.

$linkColorHover inherits from $corporateColorLight
$linkColorSelected, $linkColorSelectedHover inherits from $linkColorHover

In reality there are even more layers, for example header or footer, which makes it very difficult to keep track of what the relationships between the variables across those branches are.

If something like this could be added, this would be great. Maybe we could help you implement it, if you point me to where and how you would want something like this to be implemented.

KittyGiraudel commented 8 years ago

I don’t think this feature will ever be added in SassDoc’s core as it would probably be quite massive, but I could see a plugin that would use SassDoc to build a data tree like the one you linked to.

timschoch commented 8 years ago

I can understand that. Is there a ressource on creating a plugin?

pascalduez commented 8 years ago

Hi,

I guess with a mix of specific annotations and a custom theme one could go pretty far.

timschoch commented 8 years ago

Yep, I've looked through that page but did not find anything called a plugin - hence my question. I don't really want to create a new theme, just enhance the default one with some awesomesauce

KittyGiraudel commented 8 years ago

Plugin was my generic word for “a tool built with SassDoc”. In this case, it could be a theme.

timschoch commented 8 years ago

Mkay, I'll have a look at it - thanks