Skip to content
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

Incorrect rendering of embedded API structure hover cards #682

Closed
erickzhao opened this issue Nov 20, 2024 · 5 comments · Fixed by #690
Closed

Incorrect rendering of embedded API structure hover cards #682

erickzhao opened this issue Nov 20, 2024 · 5 comments · Fixed by #690
Assignees
Labels
area:docs Related to rendering the documentation area:prebuild Related to the prebuild scripts 🪲 bug Something isn't working

Comments

@erickzhao
Copy link
Member

Image

@erickzhao erickzhao added 🪲 bug Something isn't working area:docs Related to rendering the documentation area:prebuild Related to the prebuild scripts labels Nov 20, 2024
@erickzhao erickzhao self-assigned this Nov 20, 2024
@kaushik7kk
Copy link

Hello, @erickzhao ! I'm kinda new to Electron. Could you let me know how the hover cards are actually supposed to be rendered and if any extra input on the same will be further required?

@erickzhao
Copy link
Member Author

Hi @kaushik7kk,

For example, see what the Point object is supposed to look like: https://www.electronjs.org/docs/latest/api/structures/point

For some reason, the document title is being rendered with a <header></header> portion and we apparently can't render it using the react-markdown library.

The component that we use to render this text is located here: https://github.com/electron/website/blob/main/src/components/APIStructurePreview.tsx

@erickzhao
Copy link
Member Author

@kaushik7kk unfortunately it looks like I solved this one as part of a PR solving an unrelated bug. Thanks for writing in to ask about the issue, though!

@kaushik7kk
Copy link

Thanks for informing me @erickzhao . I'll catch up with the PR to get some more info on what fixed it.

@dsanders11
Copy link
Member

dsanders11 commented Dec 5, 2024

Looks like one of the Docusaurus updates changed the rendering of the title there to be wrapped in a <header></header>. I believe we could fix it by adding header to this list of allowed elements, or it will be fixed once #690 is merged.

allowedElements={['h1', 'ul', 'li', 'code', 'a', 'em']}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Related to rendering the documentation area:prebuild Related to the prebuild scripts 🪲 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants