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

3229 styling #3233

Merged
merged 11 commits into from
Feb 19, 2023
Merged

3229 styling #3233

merged 11 commits into from
Feb 19, 2023

Conversation

pngwn
Copy link
Member

@pngwn pngwn commented Feb 18, 2023

Description

Closes #3229. Math rendering was actually broken in more ways than that, none of the CSS was applying.

Also removes the z-index from embed error states which were causing issues.

Also adjusted the error message for non-spaces.

Please include:

  • relevant motivation
  • a summary of the change
  • which issue is fixed.
  • any additional dependencies that are required for this change.

Closes: # (issue)

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

A note about the CHANGELOG

Hello 👋 and thank you for contributing to Gradio!

All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.

Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.

@gradio-pr-bot
Copy link
Collaborator

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3233-all-demos

@aliabd
Copy link
Collaborator

aliabd commented Feb 18, 2023

nice, thanks @pngwn! We also need to remove this line

@pngwn
Copy link
Member Author

pngwn commented Feb 18, 2023

nice, thanks @pngwn! We also need to remove this line

I don't think we can remove it but I can reduce the z-index.

@pngwn
Copy link
Member Author

pngwn commented Feb 18, 2023

I was wrong, removing it seems fine.

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Feb 18, 2023

🎉 The demo notebooks match the run.py files! 🎉

@abidlabs
Copy link
Member

abidlabs commented Feb 18, 2023

I couldn't figure out why the test (test_components::TestMarkdown::test_component_functions) was passing locally but not on GitHub actions, so I just relaxed the test a little, now it's passing

I also updated the calculator demo to add some LaTeX in the description, so that we can see how the LaTeX appears as part of the deployed PR Space.

@abidlabs
Copy link
Member

abidlabs commented Feb 18, 2023

Ah but it's actually not working on Spaces either!

Spaces:

image

Local:

image

So the test is catching something meaningful. Will need some more time to investigate what's happened. I'm guessing something in one of our dependencies

@abidlabs
Copy link
Member

abidlabs commented Feb 19, 2023

The reason that the test was failing was because one of our dependencies, mdit-py-plugins just released a new version today in which custom LaTeX rendering does not work. This pins that dependency to older releases (<=0.3.3) where this is not an issue. Also opened an issue in the repo so that we can hopefully remove this pinning at some point in the future.

I've reverted by change to the test since it was useful after all, so my changes to this PR are:

  • A small tweak to interface.py to allow the Interface class's description parameter to accept LaTeX
  • Updating the calculator demo to have some LaTeX
  • Pinning mdit-py-plugins<=0.3.3

As seen in the deployed Space, LaTeX is now rendering correctly:

image

image

@pngwn
Copy link
Member Author

pngwn commented Feb 19, 2023

That was fast: executablebooks/mdit-py-plugins#69

@pngwn pngwn merged commit 4fd2ae0 into main Feb 19, 2023
@pngwn pngwn deleted the 3229-styling branch February 19, 2023 15:16
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.

Markdown: LaTeX font is black and unreadable in the dark theme
4 participants