Giter Site home page Giter Site logo

Please add multi modal widget about iced_aw HOT 6 CLOSED

iced-rs avatar iced-rs commented on July 18, 2024
Please add multi modal widget

from iced_aw.

Comments (6)

genusistimelord avatar genusistimelord commented on July 18, 2024

this sounds like a decent change!

from iced_aw.

lucatrv avatar lucatrv commented on July 18, 2024

@genusistimelord please review PR #169. I think it is a better solution to support multiple overlays: it removes the show_modal boolean altogether and changes overlay into an Option. This way it allows maximum flexibility in choosing whether to display an overlay or not (by passing None). The PR is still partial (I updated only the functional code, not the comments / documentation), but would like to get your feedback on this possible approach before completing it.

Actually I think there is even a simpler solution: by removing the Option from overlay in PR #169, the user could simply show directly underlay (without calling modal) when the overlay should not be shown. This would actually be my preference, but I ask your opinion before implementing it. With this implementation, modal would always have the overlay visible when called.

If you do not like the two above implementations, then a new multimodal widget should be added accepting a Vec of overlays and an usize. If the usize corresponds to an element of the Vec of overlays, that overlay should be shown, otherwise no overlay should be shown. IMHO this is not needed though, as the above two implementations (in particular the second one) are simpler and allow maximum flexibility.

from iced_aw.

genusistimelord avatar genusistimelord commented on July 18, 2024

yeah just fix the clippy issue as it should be good to merge.

from iced_aw.

genusistimelord avatar genusistimelord commented on July 18, 2024

Oh and add an example showing multiple modals in usage would be nice too.

from iced_aw.

lucatrv avatar lucatrv commented on July 18, 2024

Hi @genusistimelord I saw that you already merged PR #169 and fixed the clippy issue yourself. Sorry I did not answer before but yes I am adding a multiple modals example, just hold on and I am going to PR it. Before that I am also going to fix the modal's comments and documentation.

from iced_aw.

genusistimelord avatar genusistimelord commented on July 18, 2024

ok thats fine. PR whenever your ready. I will close this since the last one fixed the problem.

from iced_aw.

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.