Skip to content
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

Updates to NATIONAL PRIORITIES: fetching from latest API, client-side text extraction, client-side language identification, clarity tracking, new privacy policy page, and minor refactors #16

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

GedionT
Copy link
Member

@GedionT GedionT commented Oct 4, 2024

What's New?

This release introduces significant enhancements to the National Priorities page, focusing on improved data handling, UI/UX, and code organization. Key updates include:

  • Data Handling Improvements:

    • Data for National Priorities is now sourced from a comprehensive AIAAS endpoint, enabling more efficient analysis by offloading resource-intensive tasks to the client for custom documents.
    • Client-side Text extraction and Language identification are now performed using Web-workers and a compact WASM model, with an AIAAS API serving as a fallback mechanism.
  • UI/UX Enhancements:

    • The document upload interface for National Priorities has been refined, offering more detailed and advanced options for users.
  • Code Refactoring:

    • A new API folder centralizes all calls to the AIAAS backend, improving code organization.
    • Utility functions have been added for client-side operations, and unnecessary constants have been removed.
  • Visual and Tracking Updates:

    • Hero background images for various pages, including the country landing page, SDG Trends, National Priorities, SDG Interlinkages, and Future Scenarios, have been replaced with optimized and distinctive assets.
    • A tracking solution has been implemented using Clarity, and a new Privacy Policy page has been introduced to address its usage.

Design &Live Demo

  • The link to a live demo on a staging environment can be found here
  • The link to wireframes and designs can be found here

Commit Messages

…-side text extraction, and code refactor (#15)

  • Feat(pdfjs-dist): library import for client-side text extraction
  • Feat(api): scaffolded api calls for priorities
  • Feat(util): added a client-side text extraction util with fallback mechanism via api
  • Refactor(saliencGraph): fixed data attribute from d.sdg to d.id
  • Refactor(BubbleChart): refactored attribute from d.sdg to d.id
  • Refactor(CompareTable): fixed attribute from d.sdg to d.id
  • Refactor(VNRAnalysis): fixed attrib from d.sdg to d.id and code formatting applied
  • Feat(VNRAnalysis): added 'our approach' modal
  • Refactor(index): refactored to use api calls to retrieve and select metadata
  • Feat(constants): added the required endpoints
  • Feat(env): added configuration required to import meta env
  • Feat(priorities): added state to store invalid documents from extraction passed to VNRAnalysis
  • Refactor(extractPDF): updated error message to be concise
  • Feat(VNRAnalysis): added invalidDocument props and uses popover to display 'analysis based on'
  • Fix(detailedReportView): added a required prop to VNRAnalysis
  • Fix(ci/cd): added env import in yaml file
  • Fix(VNRAnalysis): added margin to FileNameChip tag style
  • Feat(priorities): added status in modal while uploading document for analysis
  • Refactor(extractPDF): error message refactor for more clarity
  • Refactor(VNRAnalysis): moved methodology modal to Priorities/index tabs
  • Refactor(constants): unified api into one endpoint
  • Refactor(prioritiesCall): placed all aiaas api calls in one module
  • Refactor(extractPDF): modularized api calls and batched language identification instead of individual identification
  • Refactor(VNRAnalysis): fileNameChip displayed for one document and button with Tooltip for multiple files
  • Refactor(Priorities): Methodology modal applied in tabs, Accordion font minimized
  • Feat(index): added clarity tracking tag
  • Fix(ci/cd): updated env vars injected from secret to static web apps
  • Feat(privacyPolicy): added privacy policy content
  • Feat(App): added route path to privacy policy
  • Feat(footer): added privacy policy link in footer
  • Fix(App): privacy policy import route fix
  • Refactor(PrivacyPolicy): compact no accordion policy page
  • Refactor(api): changed endpoints to updated api endpoint
  • Chore(constants): removed cdn urls for pdfdist-js
  • Feat(fasttext): added required wasm dependencies to run fasttext in-browser
  • Fix(config): module resolution changed from node to bundler to handle fasttext.wasm.js
  • Feat(config): added wasm as a list of plugins in vite
  • Refactor(extractPDF): pdfjs-dist uses internal worker file and added lang id via fasttext
  • Feat(api): added model version param to POST endpoint
  • Feat(asset): blue hero image added
  • Fix(images): indexed new blue hero image
  • Refactor(extractPDF): lang id model promise loaded only once
  • Refactor(VNRAnalysis): removed invalid docs prop and cleaned up file viewer Popover
  • Chore(DetailedReportview): removed unused props to VNRAnalysis
  • Refactor(priorities): UI/UX refactor for selection and analysis of documents
  • Fix(api): minor change to extraction endpoint to track backend change
  • Refactor(priorities): upload files process redesigned
  • WIP(styling): upload list styling overrides
  • Fix(libs): compatible typescript dev dependency added to project
  • Refactor(extractPDF): added the proper typing for languages in extraction process
  • Fix(minor): placement modification for tooltip
  • Fix(priorities): minor font fix for our approach text
  • Refactor(priorities): cleaned up modal content
  • Refactor(extractPDF): language identification model loading exported for initialization on load
  • Feat(main): model initalized on app entry
  • Feat(assets): added new hero backgrounds for pages
  • Feat(backgrounds): added new hero background for pages
  • Fix(priorities): background image, tooltip fix, and icon size change
  • Chore(prioritiesStyle): removed unused style for error item tooltip
  • Refactor(priorities): content update, state improvement and minor tweaks
  • Refactor(DefaultHomePage): country landing page background similar to global home page
  • Refactor(img): hero images compressed for production
  • Refactor(priorities): minor content update and removal process refactor

…-side text extraction, and code refactor (#15)

* Feat(pdfjs-dist): library import for client-side text extraction

* Feat(api): scaffolded api calls for priorities

* Feat(util): added a client-side text extraction util with fallback mechanism via api

* Refactor(saliencGraph): fixed data attribute from d.sdg to d.id

* Refactor(BubbleChart): refactored attribute from d.sdg to d.id

* Refactor(CompareTable): fixed attribute from d.sdg to d.id

* Refactor(VNRAnalysis): fixed attrib from d.sdg to d.id and code formatting applied

* Feat(VNRAnalysis): added 'our approach' modal

* Refactor(index): refactored to use api calls to retrieve and select metadata

* Feat(constants): added the required endpoints

* Feat(env): added configuration required to import meta env

* Feat(priorities): added state to store invalid documents from extraction passed to VNRAnalysis

* Refactor(extractPDF): updated error message to be concise

* Feat(VNRAnalysis): added invalidDocument props and uses popover to display 'analysis based on'

* Fix(detailedReportView): added a required prop to VNRAnalysis

* Fix(ci/cd): added env import in yaml file

* Fix(VNRAnalysis): added margin to FileNameChip tag style

* Feat(priorities): added status in modal while uploading document for analysis

* Refactor(extractPDF): error message refactor for more clarity

* Refactor(VNRAnalysis): moved methodology modal to Priorities/index tabs

* Refactor(constants): unified api into one endpoint

* Refactor(prioritiesCall): placed all aiaas api calls in one module

* Refactor(extractPDF): modularized api calls and batched language identification instead of individual identification

* Refactor(VNRAnalysis): fileNameChip displayed for one document and button with Tooltip for multiple files

* Refactor(Priorities): Methodology modal applied in tabs, Accordion font minimized

* Feat(index): added clarity tracking tag

* Fix(ci/cd): updated env vars injected from secret to static web apps

* Feat(privacyPolicy): added privacy policy content

* Feat(App): added route path to privacy policy

* Feat(footer): added privacy policy link in footer

* Fix(App): privacy policy import route fix
@GedionT GedionT added the enhancement New feature or request label Oct 4, 2024
Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for spectacular-palmier-0be990 ready!

Name Link
🔨 Latest commit 8ded645
🔍 Latest deploy log https://app.netlify.com/sites/spectacular-palmier-0be990/deploys/6731b6735ea6a300085e7320
😎 Deploy Preview https://deploy-preview-16--spectacular-palmier-0be990.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for sdg-push-diagnostic-v2 ready!

Name Link
🔨 Latest commit 8ded645
🔍 Latest deploy log https://app.netlify.com/sites/sdg-push-diagnostic-v2/deploys/6731b673288e590008d8b404
😎 Deploy Preview https://deploy-preview-16--sdg-push-diagnostic-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

… a Privacy Policy Page, and refactored pdfExtraction util (#17)

* Refactor(extractPDF): sampled 50k chars per pdf for language detection

* Fix(priorities): set initial state for countryVNRs to [] to handle countries without VNR data

* Refactor(PrivacyPolicy): added accordion and breadcrumb and improved UI
@GedionT GedionT changed the title Update to SDG PUSH DIAGNOSTICS/PRIORITIES: API based fetching, client side text extraction, clarity tracking, and minor refactors Update to SDG PUSH DIAGNOSTICS/PRIORITIES: API based fetching, client side text extraction, clarity tracking, privacy policy page, and minor refactors Oct 6, 2024
…nditionally set to empty list or the proper data (#18)
* Refactor(PrivacyPolicy): compact no accordion policy page

* Refactor(api): changed endpoints to updated api endpoint

* Chore(constants): removed cdn urls for pdfdist-js

* Feat(fasttext): added required wasm dependencies to run fasttext in-browser

* Fix(config): module resolution changed from node to bundler to handle fasttext.wasm.js

* Feat(config): added wasm as a list of plugins in vite

* Refactor(extractPDF): pdfjs-dist uses internal worker file and added lang id via fasttext

* Feat(api): added model version param to POST endpoint

* Feat(asset): blue hero image added

* Fix(images): indexed new blue hero image

* Refactor(extractPDF): lang id model promise loaded only once

* Refactor(VNRAnalysis): removed invalid docs prop and cleaned up file viewer Popover

* Chore(DetailedReportview): removed unused props to VNRAnalysis

* Refactor(priorities): UI/UX refactor for selection and analysis of documents

* Fix(api): minor change to extraction endpoint to track backend change

* Refactor(priorities): upload files process redesigned

* WIP(styling): upload list styling overrides

* Fix(libs): compatible typescript dev dependency added to project

* Refactor(extractPDF): added the proper typing for languages in extraction process

* Fix(minor): placement modification for tooltip

* Fix(priorities): minor font fix for our approach text

* Refactor(priorities): cleaned up modal content

* Refactor(extractPDF): language identification model loading exported for initialization on load

* Feat(main): model initalized on app entry

* Feat(assets): added new hero backgrounds for pages

* Feat(backgrounds): added new hero background for pages

* Fix(priorities): background image, tooltip fix, and icon size change

* Chore(prioritiesStyle): removed unused style for error item tooltip

* Refactor(priorities): content update, state improvement and minor tweaks

* Refactor(DefaultHomePage): country landing page background similar to global home page
@UNDP-Data UNDP-Data deleted a comment from mustafasaifee42 Nov 8, 2024
…ntent refactor in Priorities (#20)

* Refactor(img): hero images compressed for production

* Refactor(priorities): minor content update and removal process refactor
@GedionT GedionT removed the request for review from mustafasaifee42 November 11, 2024 07:46
@GedionT GedionT reopened this Nov 11, 2024
@GedionT GedionT closed this Nov 11, 2024
@GedionT GedionT changed the title Update to SDG PUSH DIAGNOSTICS/PRIORITIES: API based fetching, client side text extraction, clarity tracking, privacy policy page, and minor refactors Update to SDG PUSH DIAGNOSTICS/PRIORITIES: fetching from latest API, client-side text extraction, client-side language identification, clarity tracking, new privacy policy page, and minor refactors Nov 11, 2024
@GedionT GedionT changed the title Update to SDG PUSH DIAGNOSTICS/PRIORITIES: fetching from latest API, client-side text extraction, client-side language identification, clarity tracking, new privacy policy page, and minor refactors Updates to NATIONAL PRIORITIES: fetching from latest API, client-side text extraction, client-side language identification, clarity tracking, new privacy policy page, and minor refactors Nov 11, 2024
@GedionT GedionT reopened this Nov 11, 2024
@mustafasaifee42 mustafasaifee42 self-requested a review November 11, 2024 11:47
@mustafasaifee42 mustafasaifee42 merged commit a276f14 into main Nov 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants