Open Antolius opened 2 years ago
@Antolius the icon is going to be just an svg right? Let me know the sizes needed, I can make some
@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 ( :gemini: ) 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:
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.
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?
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).
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.
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
Currently installing Starfish registers Gemini mime type on the system. It should provide a custom icon for it as well.