You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the sake of testing and cleaner code i think it would be a good idea to decouple the model we use to render the Tree View and the underlying file directory structure
The text was updated successfully, but these errors were encountered:
Hey Rob, could you give a little more detail how this would work? I'm not sure this is the best way forward, since the current model code is quite clean and readable, and is working okay to support the user experience we want.
The old Tide for Mac worked in a similar way to how you're describing, but using a framework-supplied class that would do the loading/saving etc. It worked okay, but had some drawbacks- all files (including large resources) had to be loaded into memory while it was open (since the data wasn't simply living on the filesystem), and file-watching was much trickier to implement. The way it works currently, the folder structure in the model always matches the folder structure on disk. If we decouple, in-memory model might not match, so it's not clear where added files would go.
My other thought is that by writing tests with a real filesystem, we expose platform inconsistencies - which is a good thing. Writing tests against these, using files in an OS-supplied temp folder is a bit more work, but I think provides better results.
But I might be getting the wrong end of the stick!
For the sake of testing and cleaner code i think it would be a good idea to decouple the model we use to render the Tree View and the underlying file directory structure
The text was updated successfully, but these errors were encountered: