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

Add all AppX assets from Microsoft spec #647

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from
Open

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Nov 8, 2024

Related to pesfPa-1cz-p2#comment-763. Builds on top of #643.

Proposed Changes

Add all icon the assets, whether required or recommended, for the AppX pakcage. See details at https://learn.microsoft.com/en-us/windows/apps/design/style/iconography/app-icon-construction

Assets kindly provided by @matt-west.

Notice I tracked the assets as binaries. However, I wonder whether we should use Git LFS instead.

Granted, the size on disk is negligible, less than 3 MB:

image

But Git is made for text, not binary. Every edit to one of these files will require the whole binary being tracked in the repo. Over time, the size impact might become noticeable. Besides, it just feels wrong.

Testing Instructions

Download the unsigned AppX from the Buildkite artifacts and install it on Windows. Then... verify there are icons, I guess?

Here are some screenshots from my VM. Unfortunately, the resolution is quite poor. But at least it shows that nothing is missing?

image image image image

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? – N.A.

@mokagio mokagio marked this pull request as ready for review November 8, 2024 05:33
@mokagio mokagio requested review from wojtekn and sejas November 8, 2024 05:33
Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating all the assets!

It feels a bit odd that we track all the sizes of what is essentially the same image, but we exclude four sizes in the .gitignore.

I wonder if, instead of creating those four images dynamically, we could track them in the repository.

I don’t have a strong opinion, though. You have more experience with this process.

Comment on lines +48 to +49
path.join( assetsPath, 'WideTile.scale-100.png' ),
path.join( assetsPath, 'Wide310x150Logo.png' )
Copy link
Member

@sejas sejas Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call those files directly by their final name, such as Wide310x150Logo.png, instead of WideTile.scale-100.png?
Is it because we need both files? Can we track them in the repository as we do with the rest of sizes?

Base automatically changed from mokagio/build-appx to trunk November 13, 2024 03:12
@mokagio
Copy link
Contributor Author

mokagio commented Nov 13, 2024

Thanks for creating all the assets!

All thanks to @matt-west. I just drag and dropped.

It feels a bit odd that we track all the sizes of what is essentially the same image, but we exclude four sizes in the .gitignore.

I wonder if, instead of creating those four images dynamically, we could track them in the repository.

I don’t have a strong opinion, though. You have more experience with this process.

This is the first time I run into a setup like this, so any input is welcome. (Input is always welcome, actually.)

The reason I decided to provide those assets by copying existing ones rather than simply tracking them in the file system is because their names are not in the standard list from the docs at https://learn.microsoft.com/en-us/windows/apps/design/style/iconography/app-icon-construction . The need to have those assets with those names comes from what is written in the XML manifest template in the library that packages the appx.

Recently, I have been excited about code generation. I might have been victim of the "shiny new toy syndrome".

The fact that it looks odd to you as an observer of the setup, is enough of a signal for me to revert. It was admittedly an inconsistency in the setup, and it doesn't surprise me it stood out to you.

There is one argument in favor of not tracking those assets because they are duplicated binaries that will unnecessarily bloat the repo, but I think it's weak given the little overhead when compared with the other tens of assets.

Besides, if repo size is something we really cared about (I don't think it's a problem at the moment, but correct me if I'm wrong) then we should apply the same dynamic generation strategy to all assets that has the same content but different names. We could even track a single assets, the largest required one, and generate all variants at packaging time. But I don't think that's a need at the moment.

@mokagio
Copy link
Contributor Author

mokagio commented Nov 13, 2024

There is one argument in favor of not tracking those assets because they are duplicated binaries that will unnecessarily bloat the repo, but I think it's weak given the little overhead when compared with the other tens of assets.

Actually @sejas I'd love you hear your thoughts in this regard and with the related idea of using Git LFS.

I wonder whether we should use Git LFS instead.

Granted, the size on disk is negligible, less than 3 MB:

But Git is made for text, not binary. Every edit to one of these files will require the whole binary being tracked in the repo. Over time, the size impact might become noticeable. Besides, it just feels wrong.

This is not a must for me. Just a nitpick. Totally fine to dismiss if we care more about keeping the setup lean (in the same way that it's simpler to track all assets even though some could be derived).

@sejas
Copy link
Member

sejas commented Nov 13, 2024

I love code generation too! ❤️ .

Besides, if repo size is something we really cared about (I don't think it's a problem at the moment, but correct me if I'm wrong) then we should apply the same dynamic generation strategy to all assets that has the same content but different names. We could even track a single assets, the largest required one, and generate all variants at packaging time. But I don't think that's a need at the moment.

The size of the repository is not a problem. I believe we can track all the image sizes, even if some are duplicated. We don’t need to use Git LFS for this purpose. I agree that having a single master image tracked and generating the other sizes automatically would be ideal. There is probably a library or tool that can handle this. However, since I don’t expect changing our app icon frequently or anytime soon, I don’t think it’s worth the effort to implement such a mechanism at the moment.

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

Successfully merging this pull request may close these issues.

2 participants