PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
32 stars 86 forks source link

Remove deprecated `CodeBlock` code and properly reference files #1678

Closed anth-volk closed 1 week ago

anth-volk commented 2 weeks ago

At present, CodeBlock maintains a deprecated block, while using a less-than-ideal system of importing, then re-exporting, the block used in the API documentation pages. We should clean up this file by doing the following:

  1. Moving the API's CodeBlock to CodeBlock.jsx
  2. Getting rid of the old block
  3. Re-importing the block into the API documentation page
  4. Ensuring that we don't use the old block anywhere
  5. The old block depends on a package called "Highlight"; if we don't use that, either, we should uninstall it from the app
anmolchhabra21 commented 2 weeks ago

image I have implemented the changes, updated the imports and removed the prism-react-renderer dependency; it was not used/referenced anywhere in the code, and the website was working fine.

anth-volk commented 1 week ago

Thanks @anmolchhabra21! I was out Friday, so didn't have the chance to look over this then, but will review today.