Giter Club home page Giter Club logo

Comments (14)

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024 1

You can actually help with that, if you want :)
Here's an example: https://flet.dev/docs/controls/image#fit

from website.

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024 1

(Almost) all properties are actually optional, so let's just mention the main type: bool

If you are hopping on this, please make sure to follow the style used "Value is of type ... [and defaults to ...]" :)

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024 1

A quick question @ndonkoHenri

Should it look like this

### PaddingValue

Union of int, float, Padding and None.

I have sent a pull request in exactly this format.

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024 1

For now, the laptop on which I write this code is not in working condition, and I don't know how much I would have to wait for that. As this issue is related to all controls, I think it should be kept opened. What is your opinion?

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Thank you!

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Should the changes be like bool or Optional[bool] where it is optional?

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Bruh, I have a question. Can I just "copy/paste" the values from function (property) definitions and see the def_value from there or is there something more to do, like with the action_button_padding with type of PaddingValue which is of course a union.

from website.

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024

def_value is the default value of a property.
Not all props have one though. But if the property you are willing to document has one, then you can mention it.

Concerning stuffs like PaddingValue, I think you can just write it like that in the docs too. We could then add a section/page in the docs (still thinking of how it could be named) for all of these types, with more information on the possible values.

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Got it!

As many of the PaddingValue things are also in the docs, I suggest the name of the section as "Type Aliases". This is also a name of a new feature in python.

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Now there are conflicting types, there is a PaddingValue and a padding.Padding. I think I should leave those properties in the docs as they are in which type is given padding.Padding. They accept PaddingValue. What do you think?

from website.

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024

I suggest the name of the section as "Type Aliases". This is also a name of a new feature in python.

Nice suggestion, thanks. So, we could have "Aliases" page under "References/Types" section of the docs. Will you like to create the file for this? (aliases.md under docs/references/types)

Now there are conflicting types, there is a PaddingValue and a padding.Padding.

If we have this aliases page, we could then set the value-type of all padding-related props to PaddingValue, which has link to the aliases page (it will look like /docs/references/types/aliases#paddingvalue).

This will fix the conflict, right?

from website.

taaaf11 avatar taaaf11 commented on August 16, 2024

Will you like to create the file for this?

Sure!

from website.

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024

Can we close this issue as completed @taaaf11 ?

from website.

ndonkoHenri avatar ndonkoHenri commented on August 16, 2024

Alright, no prob, let's keep it opened.

from website.

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.