Skip to content

Conversation

@dslovinsky
Copy link
Collaborator

@dslovinsky dslovinsky commented Nov 5, 2025

Description

This allows us to kill the custom-app directory which introduced a ton of extra JS on all pages. This new component uses 0 dependencies outside of React, loads faster, looks better, and only loads its code on the homepage.

Related Issues

https://app.asana.com/1/1129441638109975/project/1208969177908953/task/1211273987105471?focus=true

Changes Made

  • Create refactored version of CodeConsole.
  • Delete custom-app
  • Remove builtwithfern CTA using CSS instead of JS

Testing

  • I have tested these changes locally
  • I have run the validation scripts (pnpm run validate)
  • I have checked that the documentation builds correctly

@dslovinsky dslovinsky self-assigned this Nov 5, 2025
@dslovinsky dslovinsky requested a review from a team as a code owner November 5, 2025 00:01
Copilot AI review requested due to automatic review settings November 5, 2025 00:01
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Nov 5, 2025, 12:09 AM

@github-actions github-actions bot temporarily deployed to docs-preview November 5, 2025 00:02 Destroyed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the custom-app directory with a lightweight React component integrated directly into the Fern environment, significantly reducing JavaScript overhead and improving performance. The new implementation loads only on the homepage and uses zero external dependencies beyond React.

Key changes:

  • Refactored CodeConsole component with custom syntax highlighting
  • Removed entire custom-app directory and build pipeline
  • Implemented CSS-based hiding of builtwithfern CTA

Reviewed Changes

Copilot reviewed 187 out of 203 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Added Shiki syntax highlighting dependencies
fern/home/index.mdx Integrated new CodeConsole component and added CSS to hide builtwithfern element
fern/docs.yml Removed custom-app JS bundle, added CodeConsole CSS
fern/components/CodeConsole/* New React component with custom highlighting and theme detection
eslint.config.ts Removed custom-app TypeScript project references
custom-app/* Deleted entire custom-app directory
.github/actions/publish-fern/action.yml Removed custom-app build step from CI
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot temporarily deployed to docs-preview November 5, 2025 00:02 Destroyed
@@ -0,0 +1,425 @@
import alchemyGetAssetTransfersEthereumRequest from "./code-samples/alchemy_getAssetTransfers/ethereum-request";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately dynamic imports don't seem to work in Fern, requiring this ugliness

@@ -1,5 +1,5 @@
curl -X POST https://eth-mainnet.g.alchemy.com/v2/{apiKey} \
-H "Content-Type: application/json" \
export default `curl -X POST https://eth-mainnet.g.alchemy.com/v2/{apiKey} \\
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

raw imports also don't work in Fern. The only solution I could find was to directly export these files as strings

@github-actions github-actions bot temporarily deployed to docs-preview November 5, 2025 00:06 Destroyed
Copy link
Contributor

@Brodan Brodan left a comment

Choose a reason for hiding this comment

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

amazing. only thing i noticed is that i see two fern CTAs on the preview.

Screenshot 2025-11-04 at 8 27 08 PM

should they both be there?

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.

2 participants