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

preferredMimeType is text/plain, even for widgets #109

Closed
rowanc1 opened this issue Mar 15, 2023 · 0 comments · Fixed by #110
Closed

preferredMimeType is text/plain, even for widgets #109

rowanc1 opened this issue Mar 15, 2023 · 0 comments · Fixed by #110
Assignees
Labels
bug Something isn't working

Comments

@rowanc1
Copy link
Member

rowanc1 commented Mar 15, 2023

On the newest version (v1.1.1) the widgets are not working for me in development or on binder.

image

I think that this has to do with when we choose to show the text-renderer (see #104), which gets chosen more often than it should.

For the line:

const preferredMimeType = rendermime.preferredMimeType(mimeBundle ?? {});

We should probably have the second argument, I think, as "any":

How to consider safe/unsafe factories. If 'ensure', it will only consider safe factories. If 'any', any factory will be considered. If 'prefer', unsafe factories will be considered, but only after the safe options have been exhausted.

With safe=undefined:
image

With safe="any" - the fix!

const preferredMimeType = rendermime.preferredMimeType(mimeBundle ?? {}, 'any');

image

@rowanc1 rowanc1 added the bug Something isn't working label Mar 15, 2023
@rowanc1 rowanc1 self-assigned this Mar 15, 2023
rowanc1 added a commit that referenced this issue Mar 15, 2023
@rowanc1 rowanc1 linked a pull request Mar 15, 2023 that will close this issue
rowanc1 added a commit that referenced this issue Mar 16, 2023
See #109

Co-authored-by: Angus Hollands <goosey15@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant