Git Product home page Git Product logo

Comments (6)

lesaltzm avatar lesaltzm commented on May 26, 2024 2

Thanks Scott!
This is an interesting point to consider. Right now, we treat a property that's missing slightly different than an empty property. A missing property means "Use the default value for this", which for Icon.HoverColor is ColorFade(Self.Color, 20%), whereas an empty property is a property that the author explicitly set to empty in PowerApps Studio. Open to changing this, let me know if you have any ideas on how to distinguish these.

from powerapps-tooling.

lesaltzm avatar lesaltzm commented on May 26, 2024 1

It's a bit tricky. We're trying to capture that the author explicitly set the property to Empty when it's default was non-empty.
In Excel, this isn't an issue, since the default value for every cell is Empty.

In our case, you would hide it by setting the property back to whatever it's original value was, in this case ColorFade(Self.Color, 20%).

from powerapps-tooling.

scottdurow avatar scottdurow commented on May 26, 2024 1

Understood - so if the property default was empty or "" and the value was changed by the maker - unpacked - then cleared - and unpacked again - it would remove the property from the pa.yaml?

from powerapps-tooling.

scottdurow avatar scottdurow commented on May 26, 2024

So if you had a value in a property (e.g. HoverFill) and you clear it - then you can never go back to it being empty again?
I think it rather comes down to the null/empty string behaviour of the control.

I can't think of any time that an empty string couldn't be treated as null for the purposes of setting properties?
In Excel, if you clear a cell then it is treated as Empty - and not ""

from powerapps-tooling.

lesaltzm avatar lesaltzm commented on May 26, 2024

Yes, pretty much. The only other thing is that empty and "" are different, so

        imgBox As image:
            HoverBorderColor: =

and

        imgBox As image:
            HoverBorderColor: =""

are different. One property is Blank(), the other is "" (empty string). Both interact with defaults the way you described in your last comment.

from powerapps-tooling.

scottdurow avatar scottdurow commented on May 26, 2024

So the rule is if I set a property to a value that is different from the default, I'll see it in the pa.yaml - but if it's the default value then I won't see it there. Perfect!

The motivation for picking up on this was that in the SoPa, some of the XML nodes get generated even if they are empty and the default value - this makes it very verbose in source control.

Closing this issue!

from powerapps-tooling.

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.