-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat(v2): Style debug pages #3296
Conversation
Deploy preview for docusaurus-2 ready! Built with commit a7b6cf1 |
This page is showing the resolved path weird, not sure if that's a netlify thing or an error. |
This should be included in a separate PR This reverts commit 9c43c9f.
thanks @Drewbi , is it ready to review and merge? About this part here: https://deploy-preview-3296--docusaurus-2.netlify.app/build/__docusaurus/debug/routes I think it's a bit weird to have the first level routes be displayed with custom views, and subroutes to be displayed with json view, we should rather choose one way or the other imho to keep it consistant. @SamChou19815 @yangshun do you think we should document the plugin and make it "official" with these improvements? |
I wasn't sure about what content would be useful on the homepage apart from a explanation of each page and the copy all metadata button so I just left this PR as mainly styling. I can definitely add the home page if you let me know what kind of content you want however. In terms of the child routes being json, I liked having the main route separated visually with a title. I feel having the whole page being separate cards with json displayed might not be easy to skim as there is no visual hierarchy. I would like to have custom styling for the child routes but since they are recursive I figured just using json would be suitable enough. Maybe an alternative would be to leave the title for each route but include the whole json for that route to be consistent with the child routes. |
@slorber I think it's quality is good enough to make it official. I think the only thing left is to document it in the docs. |
Yeah I think would be good to make it official :) |
Thanks for the feedback. @Drewbi do you want to write some basic doc? (also worth documenting the classic preset debug option to "force" it in production mode). I think we could write a blog post about why this tool is useful:
|
I'm thinking since we're trying to stay theme agnostic and can't rely on any css variables I'll just force the dark mode by setting the background to a dark color. Will also have to lock text coloring as well. |
Yes I'm fine with this solution. Unfortunately the usage of theme classic and the color mode impacts the background color globally ^^ |
@Drewbi tell me if you have time to write some doc, otherwise I'll do it, as it would be cool to release that plugin. |
@slorber I think you might have a better understanding around why you would want this information and forcing the debug in production so if you aren't too busy that could be helpful, otherwise I'll give it a go and you can tell me what I've missed. |
Closing in favor of #3392 |
Released in alpha 63 🎊 please spread the word 🙏 and tell me if this works fine for you |
Motivation
@slorber made an initial debug PR recently (#3229). This adds some nice styling to those pages.
Have you read the Contributing Guidelines on pull requests?
Yup
Design
My goal was to recreate the feel of some of the components of docusaurus without using any themes or infima variables. This is why dark/light mode is not implemented as it is non-essential and would add a lot of bulk for not much reason.
I added a basic responsive nav that should support most mobile devices as long as they aren't smaller than around an iPhone SE.
Mobile support