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

Fix mismatch of shared console log file extension with its content type #2193

Open
cpetrov opened this issue Aug 6, 2021 · 1 comment
Open

Comments

@cpetrov
Copy link
Member

cpetrov commented Aug 6, 2021

Issue description

Currently, the console contents are shared as a file with the .txt file extension when tapping on "..." -> "Share console" in the Tabris.js iOS client, although they have HTML contents.

Proposed solution

The console contents should be shared as a file with the .html extension when tapping on "..." -> "Share console".

Alternative solutions

Alternatively, the contents of the console logs could be changed to simple plain text, bringing the behavior in line with the Android client.

@karolszafranski
Copy link
Member

When sharing console as an activity item we provide an instance of NSAttributedString.

That, later on, is interpreted by the UIKit in UIActivityViewController that offers to transfer it as plain text through AirDrop. We cannot change that.

We could make a temporary HTML file with content generated from NSAttributedString and use it as an activity item. In this case, we would share a file with an HTML extension, but you would lose the possibility to simply copy the contents of the console to paste it later on in any other text editor.

I logged a few messages with console.jsx snippet to see how it looks now and I haven't found HTML tags in the file I AirDropped to my MacBook. text-282D6EA537B0-1.txt

This might mean that NSAttributedString is not always converted to HTML, just in some specific cases. Do you remember in which case you got HTML code instead of plain text?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants