informatics-isi-edu / deriva-webapps

Deriva-based web applications
Apache License 2.0
2 stars 1 forks source link

Treeview migration | Implemeting the page skeleton #212

Open RFSH opened 5 months ago

RFSH commented 5 months ago

In the existing React-jQuery hybrid treeview component I just copied the HTML template that we used to have in the jQuery app.

In this task we want to implement the page in React. The focus of this step is just the HTML structure, and we will use static values. Later, these values will be fetched based on the database. So,

  1. Under the src/components/treeview/ folder, I've created a new treeview-container.tsx, which is where you'll focus. You should add all your SCSS styles to src/assets/scss/_treeview-app.scss.

  2. All our apps follow the same top-panel, bottom-panel, etc. structure I've added in this component. For example take a look at our recordset app. You aim to implement the parts I've added TODO.

  3. You should start by changing the "content" to show a tree structure similar to what you see on the actual treeview app.

    • Just use some static data for it.
    • For some nodes, add the icons that you see in this mode to demonstrate that you can achieve this.
    • The "camera" icon opens up a modal. You should have at least one node with this feature. We're using react-bootstrap in our apps, and you can see how modals work here.
  4. The next step is "header":

    • For the dropdown selector, use the src/components/plot/dropdown-select.tsx. You can see how it works on this violin plot.
    • For the search input use the chaise's SearchInput (import SearchInput from '@isrd-isi-edu/chaise/src/components/search-input'). You can see how it's used in the recordset component. Search functionality should work similarly to the jQuery version.
    • For buttons, make sure to use chaise-btn chaise-btn-secondary class so they look similar to chaise buttons. The buttons in the current Treeview app are not aligned with the rest of the chaise and we should fix that.
  5. For the side panel, instead of just implementing the content, you should replace it with SplitView like you see on the recordset component.

In the following you can find the summary of tasks:

Useful links:

sakshisingh0598 commented 3 months ago

Eventual goal -> Implement a similar search functionality for the 2d matrix ( every deep tree should have the following search capabilities )

  1. Highlight all matching strings
  2. Scroll to the first occurrence of the match
  3. Expand and show all the matches

3rd point all functionalities are implemented - 10th July