You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should think about more on how we display things we don't have special overloads for.
the generric fallbacks.
I present two options:
ShowMime Option
#49 Which suggested the generic fallback for anything that is showable("img/png", ...)
should be to show it as an image in the image view.
And further my own desire that anything with showable for mimetype "text/plain" , "text/markdown", or "text/html" be displayed in the text view (which can render markdown/html); and that the ultimate fallback be to just showing (repring) like the ConsoleLogger does.
Destructure Option (current behavour)
This is mutually exclusive with our current fallback behavour of destructuring all structs.
E.g. to convert struct Foo a b end into showing a and showing b.
Which is also a good default.
One possibility to resolve this is to have wrapper types for one of the behavours.
So when logging something you want to have the particular behavour for, that does not agree with the default you wrap it in some indicator type.
I like the idea of making destructure a wrapper, and defaulting to the ShowMime option.
A particular advantage of this is one could use it to force destructurring on something we might have a default for. I guess something similar applies to show.
And later we might want to exend that, to be parameterized by how deep to destructure.
The text was updated successfully, but these errors were encountered:
We should think about more on how we display things we don't have special overloads for.
the generric fallbacks.
I present two options:
ShowMime Option
#49 Which suggested the generic fallback for anything that is
showable("img/png", ...)
should be to show it as an image in the image view.
And further my own desire that anything with
showable
for mimetype"text/plain"
,"text/markdown"
, or"text/html"
be displayed in the text view (which can render markdown/html); and that the ultimate fallback be to just showing (repr
ing) like theConsoleLogger
does.Destructure Option (current behavour)
This is mutually exclusive with our current fallback behavour of destructuring all structs.
E.g. to convert
struct Foo a b end
into showinga
and showingb
.Which is also a good default.
One possibility to resolve this is to have wrapper types for one of the behavours.
So when logging something you want to have the particular behavour for, that does not agree with the default you wrap it in some indicator type.
I like the idea of making destructure a wrapper, and defaulting to the ShowMime option.
A particular advantage of this is one could use it to force destructurring on something we might have a default for. I guess something similar applies to show.
And later we might want to exend that, to be parameterized by how deep to destructure.
The text was updated successfully, but these errors were encountered: