Cryosphere Innovation logo

Internal Notes

Using MDX

JSX components

MDX supports creating and using JSX components, but MDX remote doesn't seem to allow inline definition and use directly in code. All components instead need to be defined in MDXImportedComponents in pages->docs->page->index.js.

Currently just <Link/> and <CodeWrapper> are supported. We should probably look into adding <Image>.

Note: regular inline JSX/HTML works, e.g., styling text with a span.. It even works with Tailwind CSS, so long as the utility classes applied in the MDX have been used somewhere in the website before as Tailwind only bundles the classes that are used.

Creating formatted code blocks

Use the <CodeWrapper language='language'/> component, specifying your desired language as the prop. Example:

const HelloWorld = () => {
  console.log('Hello world')
}
const HelloWorld = () => {
  console.log('Hello world')
}

The result will be syntax highlighed when viewed (note: it only seems to work for js in the edit panel).

Real-Time Data

We desperately need to document the Lambda function flow. On 9 August we hit a rate limit on the Gmail API. Also, right after adding Dartmouth 2021 #11 to real-time decoding, the Lambda function triggered automatically and started downloading. No idea why that happened.

Bug List

  • 8 August 2023 Decode lambda function triggered after adding new RTD entry

    • Update After some digging it's a bit unclear exactly what is going on with the lambda function. It looks like the lambda function is actually working as expected, but the Google Pub/sub subscription is pulling the endpoint every minute or so. Currently the concurrency on the Lambda function is set to 1, which I believe will make it so only one instance can run at a time. So far it hasn't fixed it, but it might have slowed it down.
  • 13 September 2023 Need to remove the user selection combobox from non-staff instrument edit form. Would also be good to give users the ability to have their owned deoloyments show up on their page.

  • Can't seem to delete docs on mobile.

  • When selecting different deployments from the pinned deployment list, sometimes the drift track stops plotting. It's likely because there's an error in the cesium globe and it's preventing it from rerendering when navigating. A refresh solves it.

  • ✅ Mobile drop down data platform solutions links to /dashboard not /data-platform

  • ✅ No invalidate queries when selecting "mark as read" on admin

To-do

  • For the API introduction, add a "for instance, in python" step for decomposing a JSON.

Wishlist

  • ✅ Download past sensor configs from an existing instrument.
  • Add "changelog" to navbar on < 2xl so you can still see it after it disappears from the page.