Giter VIP home page Giter VIP logo

Comments (14)

jeromelaban avatar jeromelaban commented on June 16, 2024 2

@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for UnoImage at least. Other types like app icon and splashscreen will need to stay lowercased.

from uno.resizetizer.

jeromelaban avatar jeromelaban commented on June 16, 2024 1

We should never be using \ in image paths. Short-hand paths are just short hand to full URIs, let's not confuse users with a different convention.

from uno.resizetizer.

pictos avatar pictos commented on June 16, 2024

Add a troubleshot section and add this info

from uno.resizetizer.

agneszitte avatar agneszitte commented on June 16, 2024

@pictos FYI I added another point to the list after seeing some feedback for another project
Related : UnoImage - Image Width="300" Height="300" Source="Assets\Images\myImage.png"
The source path is incorrect here, should be
<Image Width="300" Height="300" Source="ms-appx:///NameOfTheApp/Assets/Images/nameoftheasset.png"
And can we add a proper example in the sample solution also please

@jeromelaban I would like to have your feedback on the fact that right now Uno.Resizetizer is forcing lowercase for the svg file name and png name in the path. I asked @pictos to specify this info inside the documentation for the moment, but wondering if we cannot just do something about this directly in Resizetizer instead of forcing the lowercase?
Related: UnoImage - One or more invalid file names were detected. File names must be lowercase, start and end with a letter character, and contain only alphanumeric characters or underscores
These details should be mentioned in the documentation also

from uno.resizetizer.

pictos avatar pictos commented on June 16, 2024

@agneszitte-nventive android, for example, has restrictions on assets for app icons, it should be lowercase. In order to avoid confusion on our users we lowered down to the commun denominator of all platforms. That way we can make sure, with less effort, that assets will follow all the platform requirements.
So in resume, this isn't a limitation of resizetizer but a limitation on targets platforms that we have to respect.

from uno.resizetizer.

agneszitte avatar agneszitte commented on June 16, 2024

@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for UnoImage at least. Other types like app icon and splashscreen will need to stay lowercased.

I agree @jeromelaban , that way we can have the proper error message only for icon/splashscreen.
@pictos you will be able to adjust the doc to have the info for the icon/splascreen section only when this will be adjusted in Resizetizer

from uno.resizetizer.

pictos avatar pictos commented on June 16, 2024

I would say that's a bad approach, having different rules for different build actions. Right now is just one, but it opens precedence for other changes like that in the future. IMHO is better/easier to educate devs right now that in order to use Resizetizer, they should provide lowercase names separated by _, instead of creating different rules for different build actions inside the same tool.

from uno.resizetizer.

agneszitte avatar agneszitte commented on June 16, 2024

I would say that's a bad approach, having different rules for different build actions. Right now is just one, but it opens precedence for other changes like that in the future. IMHO is better/easier to educate devs right now that in order to use Resizetizer, they should provide lowercase names separated by _, instead of creating different rules for different build actions inside the same tool.

@pictos but in my opinion, devs were already used to having different rules for app icons and splashscreen on all the different platforms. Now it is simpler while using Resizetizer, it just needs to be properly documented and keep the error message when needed.
We are used to having upper/lower case for the Images inside the app, so it will be easier for a project already in place to start using Resizetizer as for UnoImages, the only change needed will be in the solution explorer to replace the png with an svg without changing the XAML at all (as the path will be the same and the name of the asset also).
(cc @jeromelaban)

from uno.resizetizer.

igiona avatar igiona commented on June 16, 2024

My 2 cents on the file name casing:
as a dev I don't mind having to make the file names dash-separated and lower-case, the error tells you pretty well what you have to do.
Make an aka-URL with the explanation of the rational behind the rule would a good addon, my first thought was "why on earth in 2023 the case of a file becomes a problem?". Knowing the reason can help to accept the limitation 😄

from uno.resizetizer.

igiona avatar igiona commented on June 16, 2024

Since the Resizetizer works only with vector images (only svg?), I would add an error when the UnoImage ItemGroup
e.g. matches non-SVG files.

Or there is another benefit in having UnoImage as DeployAction for (e.g.) PNGs ? Is such a case, is it documented?

from uno.resizetizer.

pictos avatar pictos commented on June 16, 2024

@igiona Sorry for the late reply, it's very rush here hehe.

So you can use png files as well, they will be processed but will not be resized.

from uno.resizetizer.

MartinZikmund avatar MartinZikmund commented on June 16, 2024

@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for UnoImage at least. Other types like app icon and splashscreen will need to stay lowercased.

Is this tracked? It seems that the lowercase is still required for UnoImage, so I wanted to check if a new issue needs to be created @pictos

from uno.resizetizer.

pictos avatar pictos commented on June 16, 2024

@MartinZikmund if I can remember we'll that restriction will be there, because of Android and here we try to handle the minimum common operator. And this limitation shouldn't be a blocker for any dev using Uno

from uno.resizetizer.

MartinZikmund avatar MartinZikmund commented on June 16, 2024

@pictos but normal pngs do not have this limitation even in case of Android 🤔, I would expect that because Resizetizer produces scaled pngs, it should ultimately be "equivalent" to just including scaled pngs directly, or am I missing something 👀?

from uno.resizetizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.