#948

Feature: Allow Tree flatten if fits

Opensakshamgoyal-01opened 3mo ago

Prerequisites

Proposal

Is there a way to configure the flattenEmptyDirectories for trees so that it only flattens if the flattened text will fit without overflowing?

eg: if the directory is foo/bar/baz/foo2/bar2/baz2 and the container is too small, instead of showing something like /f./.b./b./f./b./b. it will simplify not flatten it in the first place. if the container is expanded and the text will fit if flattened, then convert it to flatten.

this way it can respond to changing containers and flow nicely instead of showing an ellipsis, which is not easy to use if there is a very long directory.

Motivation and context

I have lots of nested directories with very long names (total of potentially 300 char long path). This will not fit in the size of container we want to use. However, the user can choose to resize it.

Activity

5
SlexAxton2mo ago

i think, since the flattening is a projection of the core data-source, and because not all data is rendered at first, and because flattening is kind of all or nothing, this would be a very difficult feature to add. it's not as simple as a media query or something unfortunately, it goes all the way to the core of the central data structure.

SlexAxton2mo ago

i think, since the flattening is a projection of the core data-source, and because not all data is rendered at first, and because flattening is kind of all or nothing, this would be a very difficult feature to add. it's not as simple as a media query or something unfortunately, it goes all the way to the core of the central data structure.

sakshamgoyal-012mo ago

I see. So there is no way to handle that on the UI side without reworking it? If not, totally understand. this is a much smaller issue

sakshamgoyal-012mo ago

I see. So there is no way to handle that on the UI side without reworking it? If not, totally understand. this is a much smaller issue

SlexAxton1mo ago

yes, i think with the current architecture it would no be possible unfortunately.