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

fix: inline code style to hide backticks #426

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sidemt
Copy link
Member

@sidemt sidemt commented Feb 4, 2024

Checklist:

Closes #XXXXX

This is the fix I mentioned in: #418 (review)

The backticks around inline code are added by TipTap with using ::before and ::after pseudo elements. Playwright doesn't seem to have a way to access pseudo elements, so I couldn't find a way to test the style of hiding them.

@sidemt sidemt marked this pull request as ready for review February 5, 2024 14:57
@sidemt sidemt requested a review from a team as a code owner February 5, 2024 14:57
@ojeytonwilliams
Copy link
Contributor

Playwright doesn't seem to have a way to access pseudo elements, so I couldn't find a way to test the style of hiding them.

evaluate should do the trick. You can use window.getComputedStyle(element, '::before'); to find the pseudo element and then check that it's content is 'none'.

Also, I noticed the UX is a bit confusing. When I toggle the code, the editor loses focus and I have to click on it to continue editing. I think it would be nice if I could just continue typing. For reference Github comments have exactly the UX I'm talking about.

Copy link
Member

@Sembauke Sembauke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dark mode does not seem to work great at the moment with inline blocks, could you fix this?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants