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

Update to SDG PUSH DIAGNOSTICS/PRIORITIES: API based fetching, client-side text extraction, and code refactor #15

Merged
merged 31 commits into from
Oct 4, 2024

Conversation

GedionT
Copy link
Member

@GedionT GedionT commented Sep 25, 2024

What's New?

  • Added api folder to scaffold metadata fetching for priorities
  • Added a Util function to perform client-side text extraction from PDF files and fall back to API-based extraction
  • Refactored components to fit the attribute representation in the API
  • Added file-level feedback for files that failed to be displayed next to 'Analysis based on'
  • Minor content and code clean up

@GedionT GedionT added the enhancement New feature or request label Sep 25, 2024
@GedionT GedionT self-assigned this Sep 26, 2024
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://gentle-island-066846403-15.westeurope.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://gentle-island-066846403-15.westeurope.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://gentle-island-066846403-15.westeurope.3.azurestaticapps.net

Copy link

github-actions bot commented Oct 3, 2024

Azure Static Web Apps: Your stage site is ready! Visit it here: https://gentle-island-066846403-15.westeurope.3.azurestaticapps.net

Copy link

github-actions bot commented Oct 3, 2024

Azure Static Web Apps: Your stage site is ready! Visit it here: https://gentle-island-066846403-15.westeurope.3.azurestaticapps.net

@mykolaskrynnyk mykolaskrynnyk changed the base branch from main to staging October 4, 2024 11:28
@GedionT GedionT merged commit a6cd72d into staging Oct 4, 2024
@GedionT GedionT deleted the update/priorities branch October 4, 2024 11:41
mustafasaifee42 pushed a commit that referenced this pull request Nov 11, 2024
… text extraction, client-side language identification, clarity tracking, new privacy policy page, and minor refactors (#16)

* Update to SDG PUSH DIAGNOSTICS/PRIORITIES: API based fetching, client-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/priorities: Fixed bug when countries do not have VNRs, Added 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

* Fix(priorities): changed initial state for countryVNRs to null and conditionally set to empty list or the proper data (#18)

* Pre-release: Polishing pages and minor bug fixes (#19)

* 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

* Redesign/finalization: Compressed new background images, and Minor content refactor in Priorities  (#20)

* Refactor(img): hero images compressed for production

* Refactor(priorities): minor content update and removal process refactor
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.

1 participant