-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Feat] tauricon: Allow for additional custom generated icon files. #5121
Comments
Can I take this as a newbie? What i'm going to add in this file is:
|
We always appreciate contributions! The only problem here is that the |
Btw idk how other people see it but i'm not too happy about the prefix/suffix json bloat. What do you guys think about an optional {
"folder": "../frontend/src/assets/icons",
"name": "icon-{}.png", // would be icon-72x72.png for example.
"sizes": [72, 96, 128, 144, 152, 192, 384, 512]
} |
this looks cleaner & more straightforward to me. |
One thing I think could be done is to have some smart defaults here that don't require a user to setup a custom |
Since this issue is in a deprecated repo. I want to clarify it a bit. The relevant file is here. The goal is to allow custom configs for icons. Something like
The configuration for generating icons is currently hardcoded. So, a json format is needed, as I was suggested above:
And of course, there'll be default configs if user don't want to customize anything. Is everything all right? |
As far as i am concerned, the current default output must stay unchanged and this json approach looks fine to me. That said i didn't really understand Lorenzo's proposal tbh. Also i think there are no other defaults we could/should provide that we don't already have (or will have for new build targets). Edit: One additional thing: i personally would like to keep it restricted to png for now, if this was in question. |
https://github.com/tauri-apps/tauricon/blob/dev/src/helpers/tauricon.config.ts |
Yes, otherwise i would've changed it when i ported it to rust :D But we couldn't change it anyway, because it would be a weird breaking change, and at least the .deb bundle does use these files currently. As i said, we can't change anything about |
What i mean with the default output is the files it currently generates if you call
I'd prefer it in the code tbh, but if you can come up with something nice, i'm willing to reconsider. |
@FabianLars
Also, I want to ask a bit about workflow. Should I ask for help, or discuss in Discord or comment here? And how can I effectively share my prototype code for others to review without making a PR? I'm still a newbie, I'd appreciate it if you could guide me through this stage. |
This is how the .ico format works. These are just "layers" contained in a single file. Here again, all these sizes need to stay, and the order is important too (32 must be before 16 and 24 so it's the first layer)
Yes, because it's the 128px icon for high dpi mode. I'd recommend not really touching the current code for now and just slap your own stuff on top, we can refactor it later before merging.
Discord is preferred for live communication aka chatting. Otherwise the general approach (that i like) seems to be to first try to explore the basics of the topic in the issue, and then if you have some kind of PoC implementation, create a draft PR and move the discussion about specifics over there and only report back major things in the issue to not annoy issue subscribers 😅 |
Here is my first PR |
… (tauri-apps#5246) Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de> Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
I have the use-case where I serve my front-end as a tauri app and also as a web-app with PWA support. Instead of maintaining two sets of icons, I would like to just generate one set that is used by everything. This is probably a pretty common use-case.
So it would be nice to have a way to define alternative icon formats, sizes and file-names, that are also generated by
tauricon
.Currently, the files to be generated are defined here: https://github.com/tauri-apps/tauricon/blob/dev/src/helpers/tauricon.config.ts
Probably the easiest implementation would be to keep that same structure and provide it via the cli as a json file:
And then the
icons/extra.json
could be something like this:What are your thoughts about that?
The text was updated successfully, but these errors were encountered: