This page should populate at http://localhost:3000/queryBuilding if there are queries present in the database, which is currently the case because query has the 220 default eRSD queries in it at the moment.
For now, I've limited that to just two queries. I found that the table had trouble rendering for 220; I think this has to do with how the backend pulls the data that should be less relevant once we have a query_data column; basically the backend is doing a lot more complex work to replicate query_data that it should not have to do to pull that data. We may want to revisit the backend pull after that is done; we could simplify from:
// Type definition for CustomUserQueries
export interface CustomUserQuery {
query_id: string;
query_name: string;
conditions_list?: string;
valuesets: ValueSet[];
}
to
// Type definition for CustomUserQueries
export interface CustomUserQuery {
query_id: string;
query_name: string;
conditions_list?: string;
query_data?: JSON;
}
And add query_data and conditions_list to getCustomQueries at a later date if we did want to try to simplify that function for now. I think it may make sense to do that in the next PR to get this merged, or at least focus on any needed frontend changes in this ticket for the time being.
Similarly, I've just repeated the condition.name in the conditions column as well as query_name just to demonstrate what that will look like; this will eventually have differences based on how queries are saved but we do not yet have the functionality to save/edit queries. I added some additional fluff text to query_name to differentiate for the purposes of design review.
The only button that is functional on the page at the moment is the create query button, which will redirect to build from templates; edit and delete will come in future PRs.
Related Issue
Fixes #134
Additional Information
@mikang a few design questions:
Is there anything that should happen when you hover over a query and click? Should that take you to the edit page eventually?
Should there be a line between entries in the table? Any other formatting changes (background color, etc.)?
Are the ellipsis as-is okay? I know at one point we had discussed if a name of a query or something got long that we would truncate it so that the full text only appeared when hovered over. I added some additional text to query name to demonstrate what this looks like.
Checklist
[x] Descriptive Pull Request title
[x] Link to relevant issues
[x] Provide necessary context for design reviewers
PULL REQUEST
Summary
This adds this page in Figma: https://www.figma.com/design/Iuw9me6kYftBF4WTCEsCZz/Query-Connector?node-id=475-20666&node-type=frame&m=dev.
This page should populate at http://localhost:3000/queryBuilding if there are queries present in the database, which is currently the case because
query
has the 220 default eRSD queries in it at the moment.For now, I've limited that to just two queries. I found that the table had trouble rendering for 220; I think this has to do with how the backend pulls the data that should be less relevant once we have a
query_data
column; basically the backend is doing a lot more complex work to replicatequery_data
that it should not have to do to pull that data. We may want to revisit the backend pull after that is done; we could simplify from:And add
query_data
andconditions_list
togetCustomQueries
at a later date if we did want to try to simplify that function for now. I think it may make sense to do that in the next PR to get this merged, or at least focus on any needed frontend changes in this ticket for the time being.Similarly, I've just repeated the
condition.name
in theconditions
column as well asquery_name
just to demonstrate what that will look like; this will eventually have differences based on how queries are saved but we do not yet have the functionality to save/edit queries. I added some additional fluff text toquery_name
to differentiate for the purposes of design review.The only button that is functional on the page at the moment is the create query button, which will redirect to build from templates; edit and delete will come in future PRs.
Related Issue
Fixes #134
Additional Information
@mikang a few design questions:
Checklist