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

Denon MC7000: Document new jogwheel settings #690

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Aug 18, 2024

This is a sibling PR to mixxxdj/mixxx#4684 that documents the new mapping settings, specifically jogwheel acceleration.

@ronso0 ronso0 changed the title MC7000: Document new jogwheel settings Denon MC7000: Document new jogwheel settings Aug 18, 2024
@JoergAtGithub
Copy link
Member

The formatting looks broken:
grafik

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Oh that's interesting, locally the math rendered fine for me:

image

Is this something that has to be configured for the deployment?

@JoergAtGithub
Copy link
Member

My screenshot is from the Netlify Preview.

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Looks like something's wrong with the way MathJax is loaded:

image

I found a forum post that discusses this and we might be able to get this to work by updating the content security policy to allow loading the MathJax script:

https://answers.netlify.com/t/enabling-mathjax-without-using-cms/6873/4

We ran into this now because the Mixxx manual didn't seem to use any math yet, but if we need to add a formula somewhere in the future this would probably be useful to have anyway.

@Swiftb0y
Copy link
Member

I agree. We should also look to whether its feasible to render the formula to SVG at build-time rather than relying on client-side JS to do it since it results in a suboptimal user experience (slower loadtime, likely shifting page content as placeholders get expanded to their content, etc).

@JoergAtGithub
Copy link
Member

Maybe it's only an issue of the Netlify Preview?

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

We should also look to whether its feasible to render the formula to SVG at build-time rather than relying on client-side JS to do it since it results in a suboptimal user experience

MathJax is pretty standard across the ecosystem and from what I understand client-side rendering is a bit better for accessibility, but you're right that things shifting around is generally less nice. Maybe MathML would be an option too, but I'm not sure if Sphinx supports that.

I think configuring the Netlify CSP to support MathJax should be pretty easy, therefore I would lean towards doing that for now and moving SVG prerendering etc. into a separate PR.

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Okay, so enabling SVG rendering was actually a lot easier than I thought, configuring Sphinx to use sphinx.ext.imgmath with SVG was enough 😄 Though I am still a bit torn. SVG rendering might be the easiest, least-invasive option for now, but I still think we should explore MathJax/MathML rendering in the future.

Advantages of SVG rendering:

  • Faster rendering on the client-side
  • Doesn't cause layout to jump around during rendering
  • Better compatibility with different (especially legacy) browsers
  • Doesn't require changing the Content-Security-Policy

Disadvantages:

  • Slower build times
  • Worse accessibility
  • Text selection doesn't work in formulas
  • Text is less crisp due to being prerendered

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

Hm, for some reason this still doesn't work in the deploy preview, though the CSP error seems to be unrelated:

image

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

I suspect the issue is that Netlify's build environment is somehow missing dvisvgm (the LaTeX renderer)... maybe MathJax is the way to go after all.

@fwcd
Copy link
Member Author

fwcd commented Aug 18, 2024

After updating the Content-Security-Policy to allow MathJax, the math now renders properly on Netlify. This uses the default client-side MathJax renderer for now, we can discuss using alternative renderers in future PRs including potential tradeoffs, this seems to be too large to tackle here.

I have also squashed/cleaned up my commits, so the PR should be ready for another review.

@JoergAtGithub
Copy link
Member

LGTM! Thank you!

@JoergAtGithub JoergAtGithub merged commit 7265ead into mixxxdj:2.5 Aug 19, 2024
8 of 9 checks passed
@fwcd fwcd deleted the mc7000-jog-acceleration branch August 19, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants