-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Doc] Add a tips section on the home page #10541
base: next
Are you sure you want to change the base?
Conversation
docs/js/ra-doc-exec.js
Outdated
} else { | ||
// fetch the new content | ||
fetch(window.location.pathname) | ||
.then(res => res.text()) | ||
.then(replaceContent) | ||
.then(() => { | ||
toggleDockBlocks(false); |
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 know it's not from your PR but this typo trigger me...
- toggleDockBlocks(false);
+ toggleDocBlocks(false);
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.
Thanks for the fix on the navigation and the simplification with the modules 👍🏻
Regarding the tips section, I'm a bit annoyed by the flickering introduced with this part...
Screencast from 2025-02-24 14-51-12.webm
I don't know what is the best solution but I think we can do better, let's discuss that with the rest of the team to find some ideas.
The feature doesn't work in my tests with |
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.
Nice!
import { transpileModule } from 'https://esm.sh/[email protected]'; | ||
import * as prettier from 'https://esm.sh/[email protected]/standalone'; | ||
import * as babel from 'https://esm.sh/[email protected]/plugins/babel'; | ||
import * as estree from 'https://esm.sh/[email protected]/plugins/estree'; |
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.
Why did you add this plugin?
@@ -185,232 +214,9 @@ const buildJSCodeBlocksFromTS = async () => { | |||
applyPreferredLanguage(); | |||
}; | |||
|
|||
// eslint-disable-next-line no-unused-vars |
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.
Did you change anything in the code you've moved? The large diff makes this PR hard to review.
const tipElement = document.getElementById('tip'); | ||
if (!tipElement) return; | ||
|
||
const tips = await getContents('/assets/tips.md'); |
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.
Can you await both Promises in parallel instead of in series?
Problem
We have many tips that we regularly post on different medias. It's a shame we don't use them on the documentation itself
Solution
How To Test
make doc
Additional Checks
master
for a bugfix, ornext
for a featureAlso, please make sure to read the contributing guidelines.