I am newbie and looking for a collapsible sidebar with the list of uploaded files.
I am able to get a basic one but navigation is not good and also it is not collapsible. I see some bootstrap ones(e.g https://bootsnipp.com/snippets/DV41) but not sure how to use them?
Do I download them and store for the app to access? Any details on how-to is appreciated. The documentation says download and store the css and js files, but how about HTML to display the equivalent UI(here it is sidebar). Should I put the corresponding HTML into my layout? But the syntax is different from the DASH syntax(e.g it has div class).
I have a list of fully qualified filepaths which I would like to display as a file tree, something like this:
I’ve found some css examples that are a bit useful but nothing plotly specific. Without having to do any heavy lifting I’m hoping to find an elegant solution here.
Edit: Viewing file contents is out of scope. I’m only concerned with a user being able to view a directory structure.
@AnnMarieW This is awesome and just what I am looking for, thank you! This is one of the reasons why I love this community so much, folks are willing to help out so readily to share information.
If you’re interested in knowing the motivation, I’m building a simple UI to allow users to upload their apps to Heroku / whatever. Baking this into dashtools.
I’m not sure how to make components but I feel that this could be useful to people. Might move this conversation to a new #show-and-tell thread if there is enough interest.
hi @andrew-hossack@AnnMarieW awesome work! Do you know how we can add a search bar at the top of the file tree and match the search string with any of the tree nodes as shown in the image below:
It uses jquery in order to be able to navigate quickly, imo. If you are using this for navigation, be sure to empty out the string on navigation click.
@jinnyzor Thanks for the code! I’m not very strong on JavaScript but the code you shared seems to expand every Accordion item regardless of whether the search string matches the item, as shown in the shared video. Ideally I would like to expand only the items that contain the search string. For example, if the search string is mycss then only the folder assets should be expanded and not both the assets and pages folders. If there is no match, no item should be expanded. Any help would be much appreciated!