-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add Fumadocs #111
base: main
Are you sure you want to change the base?
Add Fumadocs #111
Conversation
@pomber is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There is also currently a bunch of "webpack-internal" warnings when running locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pomber Thanks for working on this!
Overall, this is looking promising, and I’m looking forward to seeing locale implementation for the app router. Having an alternative app router layout is something I’m particularly excited about, as it will help us migrate pages step-by-step from the pages router to the app router.
I second what John wrote above: first and foremost, we don’t want to lose any of the existing functionality. The UI should also match the current level of implementation, including hovers, active states, sizing, and overall typography.
Additionally, tables, alerts, and code snippets from within the /docs*
are critical elements, and we need to ensure they are migrated properly.
P.S. Please fetch the latest changes from the main branch and apply them to the newly created next.config.mjs and rewrites-redirects.mjs.
"@types/node": "^22.7.4", | ||
"@types/styled-components": "^5.1.34", | ||
"autoprefixer": "^10.4.20", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed? Trying to understand how autoprefixer
helps here since most modern browsers implemented standardized CSS properties with minimal need for prefixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's probably safe to remove, I need to check if Tailwind is using any newish feature that depends on prefixes though, because they recommend it in their docs
@@ -73,17 +78,19 @@ | |||
"postcss-preset-env": "^10.0.5", | |||
"prettier": "^3.3.3", | |||
"svg-react-loader": "^0.4.6", | |||
"tailwindcss": "^3.4.14", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read your comment about Tailwind and yeah am not a big fan of including tailwindcss
once again and w/o the tw
prefix this time. But we can accept that given the situation - looking forward though to have this polished as much as possible to reduce the amount of unused CSS here.
Curious if you have any other insights overall here, considering the solana-lib repo et all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few questions about solana-lib, I'll ask later on slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the postcss
notes, and yeah these changes need to be reverted back, otherwise as you expect lots of stuff will break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep I'll add the purge plugin back, it's a matter of writing the right regexp so it includes the missing tailwind classes, but I want to profile and compare the before and after output to make sure it's done right
I think the idea for most of those components is to use the ones built-in in fumadocs. For example, the steps component. We shouldn't lose any functionality, the current issues with the layout and styles are mainly because of the "minimum viable fumadocs integration" state of the PR. |
What are the errors? these? I think those were there from before, I can take a look if you want. I'm guessing they come from |
You're right it seems the warnings already existed. I just cloned the repo again, ran locally, and got the same warnings. Please leave them for now and prioritize the migration, thanks.
|
This is a draft PR showing how to use fumadocs as the docs framework.
/docs
path (with placeholder content)TODO
@ts-ignore
annotations that can be removed after the old docs framework is replaced (because of some conflicts between different versions ofmdx/types
)RE Tailwind duplication:
fumadocs components ship with unprefixed classes, while solana-lib use the
tw
prefix, this means that we need to include two tailwind stylesheets (only for the routes that use fumadocs), we can still use something likecssnano
to remove any duplicated CSS (like tailwind's preflight styles)