In our design system, we have a type of object called TreeItem that we use for representing things like files and folders in the UI. When we load a drive, we translate the objects in the drive which are of type Node to the TreeItem type. This is problematic for several reasons. The biggest one being that there is information that a Node object has, like its parent folder for example, that is lost in translation. This leads to a lot of inefficiency because we are constantly trying to figure out this information retroactively when we need it, instead of just making it available at the point of loading the drive. All of this back-and-forth also creates huge surface area for bugs.
Nodes vs Tree Items
In our design system, we have a type of object called TreeItem that we use for representing things like files and folders in the UI. When we load a drive, we translate the objects in the drive which are of type Node to the TreeItem type. This is problematic for several reasons. The biggest one being that there is information that a Node object has, like its parent folder for example, that is lost in translation. This leads to a lot of inefficiency because we are constantly trying to figure out this information retroactively when we need it, instead of just making it available at the point of loading the drive. All of this back-and-forth also creates huge surface area for bugs.