-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
fix: copy button and horizontal scrollbar position in codeblocks #1309
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-1309--asyncapi-website.netlify.app/ |
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.
@janvi01 Based on the changes you made in the docs, they are not managed from this repository. For generator docs, the official documentation is maintained at generator repository. So, even if you change the backticks to the CodeBlock
component, it will get rewrite once the workflow runs to update the docs in the website.
Also, you should ask first @alequetzalli whether all the Doc contributors will agree on using the <CodeBlock>
component comfortably instead of backtick notation to write commands.
I don't think we can only use the codeblock element, I think we'll still use the ``` for some scenarios. Thoughts @derberg O_O? |
When using backticks, there is a misalignment of the copy button position. I don't know what is the reason, but when using the code block element it works well maybe we can find out why it is happening. |
@janvi01 @alequetzalli yup, we need a fix for both, the backticks and |
Closing this PR as this is not the appropriate solution, I have changed the backticks and codeblock css both in #1401 |
Description
The PR fixes the scrollbar position and misalignment of copy button in code blocks on various doc pages.
The misalignment was caused due to code blocks wrapped within backticks instead of the
codeblock.js
component.Screenshots -
Before
![Screenshot 2023-02-08 at 10 51 57 AM](https://user-images.githubusercontent.com/34344234/217441824-b49225d5-1c96-467b-85d8-24de3956c3b7.png)
After
![Screenshot 2023-02-08 at 10 52 21 AM](https://user-images.githubusercontent.com/34344234/217441894-313ecb7d-c2de-420e-aced-a231c2f850cb.png)
Related issue(s)
Fixes #1292