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

Restore Markdown formatting for Chatbots, MarkdownCode #7936

Merged
merged 14 commits into from Apr 4, 2024

Conversation

aliabid94
Copy link
Collaborator

The MarkdownCode object does not format several of its Markdown elements, including headers, lists, backquotes because it doesn't use the prose class. Added.

Before:
Screenshot 2024-04-04 at 1 28 27 PM

After:
Screenshot 2024-04-04 at 1 27 56 PM

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Apr 4, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website building...
Storybook ready! Storybook preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/ec561f25da56d1b2bf3414c916b9069003f51215/gradio-4.25.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@ec561f25da56d1b2bf3414c916b9069003f51215#subdirectory=client/python"

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Apr 4, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/markdown patch
@gradio/theme patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Restore Markdown formatting for Chatbots, MarkdownCode

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs added the v: patch A change that requires a patch release label Apr 4, 2024
Copy link
Member

@pngwn pngwn left a comment

Choose a reason for hiding this comment

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

This messing up the spacing in both the data frame and the chatbot. We'll need to fix that somehow.

It would also be good to modify one of the chatbot stories to use some more complex markdown so we can catch any regressions or strangeness since the markdown code component is used in a few places.

@aliabid94
Copy link
Collaborator Author

I fixed the extra spacing at the bottom of each markdown blob. The text size has gotten 2 points smaller in the chatbot because we use --text-md in prose (14px), instead of the usual 16px used for buttons. But I think almost all the visual changes make sense, this makes MarkdownCode look consistent with Markdown.

Can you point to specific issues?

Could add UI test that's more visually complex.

@pngwn
Copy link
Member

pngwn commented Apr 4, 2024

Was just that bottom spacing I think. Other changes look fine to me, I only noticed when reviewing the UI tests.

@dawoodkhan82
Copy link
Collaborator

lgtm! I don't notice any breaking style changes

@aliabid94 aliabid94 merged commit b165193 into main Apr 4, 2024
8 checks passed
@aliabid94 aliabid94 deleted the restore_prose_formatting branch April 4, 2024 22:04
@pngwn pngwn mentioned this pull request Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants