Skip to content

Environmental summary banner #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 12, 2025
Merged

Environmental summary banner #454

merged 3 commits into from
Mar 12, 2025

Conversation

leoraba
Copy link
Contributor

@leoraba leoraba commented Mar 10, 2025

Description

Implement Environmental Summary Banner on Home page. Data is recollected through Arranger which aggregates the relevant results for display.

UI Changes

  • Increase Hero Banner height to accommodate environmental summary details and link.
image

Environment variables

Changes uses the environment variables to get the exact number of records:

  • NEXT_PUBLIC_ARRANGER_ENVIRONMENTAL_CARDINALITY_PRECISION_THRESHOLD: Precision threshold to count number of samples in the bucket. Default 3000
  • NEXT_PUBLIC_ARRANGER_ENVIRONMENTAL_MAX_BUCKET_COUNTS: the max number or records in the bucket. Used to get exact number of samples . Default 1000

Refactoring

  • Changes include refactoring and organizing React components into different folders to differentiate between clinical and environmental data.

Issue Releated:

Waste Water: #58

Comment on lines 78 to 94
const fetchArrangerData = ({
endpointTag,
query,
sqon,
}: {
endpointTag?: string;
query: string;
sqon?: SQONType;
}) => {
return arrangerFetcher({
body: {
query: query,
variables: { sqon },
},
endpointTag,
});
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part doesn't need to be duplicated, as it's a shared function...
thinking the structure of these hooks could be turned around.
i.e. now:
hooks/clinical/useReleaseData/index.ts
hooks/environmental/useReleaseData/index.ts

vs:
hooks/useReleaseData/index.ts implements environmental.ts and clinical.ts, reusing code in index.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this! I just changed the code to organize hooks/useReleaseData/index.ts to include the shared code, whereas in environmental.ts and clinical.ts contain specific code.

@leoraba leoraba merged commit c07a144 into wastewater Mar 12, 2025
2 checks passed
@leoraba leoraba deleted the ww_summary_banner branch March 12, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Homepage UI : Create a bar on hero section for wastewater stats
2 participants