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

Provide Gemini mime type icon #15

Open
Antolius opened this issue Nov 28, 2021 · 6 comments
Open

Provide Gemini mime type icon #15

Antolius opened this issue Nov 28, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@Antolius
Copy link
Contributor

Currently installing Starfish registers Gemini mime type on the system. It should provide a custom icon for it as well.

@Antolius Antolius added the enhancement New feature or request label Nov 28, 2021
@Suzie97
Copy link
Contributor

Suzie97 commented Jan 16, 2022

@Antolius the icon is going to be just an svg right? Let me know the sizes needed, I can make some

@Antolius
Copy link
Contributor Author

@Suzie97 that would be great!

Yes, format is svg, and sizes are same as for app icons (128, 16, 24, 32, 48, 64 and "symbolic"). At least those are the ones that elementary itself provides.

For design I was thinking of making it distinct from app icon. That way users can have multiple clients installed (e.g. Starfish & Lagrange) and even use some other app as the default without file icons looking out of place. We could use a zodiac inspired ( ♊ ) sign in the icon. Or perhaps explore NASA's Gemini missions for inspiration, as these missions are actually what Gemini protocol is named after. Maybe base it on the Gemini project patch:

240px-GeminiPatch

From technical side I think we can install files just like app icons here, just change the last directory from 'apps' to 'mimetypes'. If files themselves are called text-gemini.svg I think it might work out of the box. If not we can add <icon>text-gemini</icon> line into existing gemini-mime-type.xml file.

Relevant part of the meme info spec:

icon elements specify the icon to be used for this particular mime-type, given by the name attribute. Generally the icon used for a mimetype is created based on the mime-type by mapping "/" characters to "-", but users can override this by using the icon element to customize the icon for a particular mimetype. This element is not used in the system database, but only used in the user overridden database. Only one icon element is allowed.

@Suzie97
Copy link
Contributor

Suzie97 commented Jan 18, 2022

For design I was thinking of making it distinct from app icon. That way users can have multiple clients installed (e.g. Starfish & Lagrange) and even use some other app as the default without file icons looking out of place. We could use a zodiac inspired ( ♊ ) sign in the icon. Or perhaps explore [NASA's Gemini missions]

So the icon will only be visible if users install Starfish? What if someone does not have Starfish installed and uses something else like Lagrange instead? I think if we want to make a generic icon, we should make a PR to the elementary icons repo right?

@Antolius
Copy link
Contributor Author

So the icon will only be visible if users install Starfish?

Yeah, currently registering the mime type happens at the time of Starfish install. I'm not sure is other Gemini clients do the same. Generally having a local file-type defined is not really necessary, as the client loads content from the internet in most cases. A local file-type is useful only for users that have gemtext markup files stored locally on their PCs. One use-case would be Gemini authors who write markup files directly. In this case a client such as Starfish, which is capable of displaying a file:///path/to/local/file.gmi URI, can be used to preview those gemtext files locally without having to upload them to the server first.

With that in mind, adding the text/gemini mime type on elementary OS level would be cool, but I'm not sure if maintainers would be interested in it. Also, users will probably be able to install newer versions of Starfish on older elementary OS versions, meaning that even if OS starts shipping the gemini mime type (definition and icon) at some point I think there's also value in making sure it exists at the moment of Starfish install (or update). So I guess the best approach would be to add icon to the app and then offer to port it upstream (to the OS level). We'll need to check how overrides are handled though (i.e. what happens if both OS and the app try to define the same mime type).

@Antolius
Copy link
Contributor Author

I looked into this one a bit more, and text/gemini mime type is not yet officially registered, as can(not) be seen in the IANA media types list. There's been some discussion about this in, as far as I know unofficial, GitLab issue tracker for the Gemini protocol. Gemini mailing list is currently down so I can't check there.

As for other browsers installing the mime type for .gmi file extension, I see that Kristal browser does it here (and it's a bit more detailed than what Starfish does, so we could probably learn from it). But as far as I can see it doesn't provide an icon for it. I looked for it in Lagrange's code, but as far as I understand it only does it for iOS and MacOS (though I might be reading this config wrong, I'm not really familiar with it).

At this point I think it's better to define the mime type (and its icon) on the application level, until it's been officially registered. I also think it would be a good idea to go with a more inclusive icon, so that we can pull it upstream to elementary level at some point in the future.

@Suzie97
Copy link
Contributor

Suzie97 commented Jan 23, 2022

At this point I think it's better to define the mime type (and its icon) on the application level, until it's been officially registered. I also think it would be a good idea to go with a more inclusive icon, so that we can pull it upstream to elementary level at some point in the future.

Great, my exam was over today, so now I can get back to work. I'll share a few sketches here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants