Coder Social home page Coder Social logo

tree-navigator's Introduction

Tree Navigator

This project is a single page application that parses a json tree and visually represents its structure. Along with this, a user can search through the tree for any child node.

Tree Navigator

Local Setup

Prerequisites

Installation

  1. git clone https://github.com/bjoberg/tree-navigator.git
  2. Navigate into the cloned directory
  3. Run npm install
  4. Run npm start

Open http://localhost:3000 to view it in the browser.

Things to Improve

  • TreeNode Keys: Ideally I would not be using the node name as the id / key; however with the current data, the only way to default the tree open and stay open is to use non dynamic keys (i.e. node name). You can see the affects of this when you select a directory that has the same name as another directory... both will toggle.
  • Search Query: The search query rerenders the entire tree every time a new search is made. In the future, I would like to modify the existing tree, instead of completely rerendering it.
  • Unit tests: I wanted to keep my solution to a few hours of work, so I deprioritized unit tests; however to help describe my process for writing tests I included basic tests for the <Search /> component
  • More user feedback while searching: It would be nice if the user had more context for what was happening when they were typing in the search bar. Would be nice to return the number of results found and other miscellaneous status indicators.
  • Utilize the "type" field: In the future, I would like to utilize the type field to display what type of node each tree item is (e.g. icon).
  • Dockerize: Generic dockerfile for containerizing this application
  • Production server: Add a production server (e.g. express) to server our bundled files

Resources

tree-navigator's People

Contributors

bjoberg avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.