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

Restyles model names in Markdown to avoid wrapping model names #606

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

JasonWeill
Copy link
Collaborator

Fixes #604.

Before, some model names would break across lines:

image

Now, model names may not wrap across lines:

Screenshot 2024-01-26 at 3 34 23 PM

With the exception of the help text for Hugging Face, we now use a CSS rule to set font family and wrapping style. When multiple models' names are present, I think this makes a long list of models easier to read than before.

@JasonWeill JasonWeill added enhancement New feature or request @jupyter-ai/magics labels Jan 26, 2024
@JasonWeill
Copy link
Collaborator Author

Here's what the table looks like as a list:

image

I had avoided using a list earlier because, especially on extra-wide screens, the %ai list command's output would have a lot of unused space on the right. What do you think?

@krassowski
Copy link
Member

List looks clearer to me. To be honest when working with notebooks in lab on 4k I usually have two notebooks or notebook and editor open side by side. In Jupyter Notebook there is max width I believe and the content gets centered so again the white space is not a practical concern.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@JasonWeill JasonWeill merged commit 008cd41 into jupyterlab:main Feb 1, 2024
8 checks passed
@JasonWeill
Copy link
Collaborator Author

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Feb 1, 2024
JasonWeill added a commit that referenced this pull request Feb 1, 2024
…model names (#615)

Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
…erlab#606)

* Restyles model names in Markdown to avoid wrapping model names

* Renders models in an unordered list in a cell
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
…erlab#606)

* Restyles model names in Markdown to avoid wrapping model names

* Renders models in an unordered list in a cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/magics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyphens in model IDs can break across lines in "%ai list" markdown output
2 participants