advweb-grp1 / advanced-web-final-year-project

Final year advanced web develop unit project
MIT License
1 stars 0 forks source link

Query Data #10

Closed rwx-yxu closed 1 year ago

rwx-yxu commented 1 year ago

Summary

The user wants information about some data

Basic Path

  1. The use case starts when a user indicates that he/she wants information about some data by entering a search term.
  2. The system retrieves the data.
  3. The system presents the data including a data plot

    Alternative Paths

    Step 1: The system presents an advanced dialog for the user to enter more specific details about their query (on user indication), e.g., by clicking a button for ‘advanced search’. Step 3: If the data does not exist, the system displays a message and repeats step 1.

    Exception Paths

    The user can cancel the operation at any time

    Preconditions

    The data exists in the repository.

    Postconditions

    The data is displayed to the user

rwx-yxu commented 1 year ago

Excalidraw link for UX draft: https://excalidraw.com/#json=G9siQUPi99ukeor4fsHl6,71tn7T4HWbzKCHZGxkO_FQ

rwx-yxu commented 1 year ago

Currently facing a design decision on the components fir the view. I currently have the following:

The search components emit the results back to the view. The question comes from the select columns and the results grid. With how I want to communicate with them. Either I put it into two separate components which emit to the view and have the view call an exposed method to the other component e.g. select column -> view -> results grid. Or, I make one component that has both of them which may simplify the communication logic. search bar -> view -> select column results. I am not entirely sure what is best practice since it feels messy to have a select column component communicate directly to the results grid if I have search components emit to the view parent. Keeping the communication logic behave the same for all components in a view seems like it is better.

rwx-yxu commented 1 year ago

Convinced myself to have two separate components. When a collumn is selected, that will emit the column array to the parent view which I can then trigger a build function on the results grid.

rwx-yxu commented 1 year ago

Progress update. I have a data grid component which will dynamically render the columns based on the columns that are selected from a list. Still need to think about pagination.

rwx-yxu commented 1 year ago

Search and pagination implemented

rwx-yxu commented 1 year ago

Noticed that the advanced search doesn't have a selector for the columns. Currently, we have this spec'd out on excalidraw: image

rwx-yxu commented 1 year ago

Should add a 'reset' button to reset the state after a search is done because it is not really clear that you need to search on an empty input box to get back all the data.

rwx-yxu commented 1 year ago

Instead of input 1, perhaps, I should just have a column drop down instead. The downside to this approach is that just having the comparators leaves the interpretation to JavaScript. What if one of the columns contains strings for example? what should it mean if I have a field value of "text" < 39s?