Giter VIP home page Giter VIP logo

Comments (8)

maeddin avatar maeddin commented on July 23, 2024 1

I removed current and currentIndex from TapInfo, because I don't know any practical use case for these values in TapInfo.
However, beforeTap and beforeTapIndex are good name suggestions that I may include in a later release.

Thanks for the help. You created this issue at just the right time that the changes could still be added to version 0.8 🙂

from animated_toggle_switch.

OroshiX avatar OroshiX commented on July 23, 2024 1

The position field of TapInfo could benefit from a more extensive comment about what possible range for the values it could take: if we are tapping slightly on the left of 1st element, is it = to -1, or to 0 or -0.2? Or maybe the tapInfo is null? (same question for tapping on the right of last element)

Apart from that, the new structure is still understandable in my opinion.

from animated_toggle_switch.

maeddin avatar maeddin commented on July 23, 2024

Thanks for the feature request. I will change the onTap method to pass a parameter. I'll comment again once I've implemented a first prototype of the feature.
Do you have any additional suggestions on what else to pass in this parameter besides the tapped value and index?

from animated_toggle_switch.

maeddin avatar maeddin commented on July 23, 2024

@OroshiX Could you take a look at my implementation of this feature? I would appreciate any feedback on this :)

from animated_toggle_switch.

OroshiX avatar OroshiX commented on July 23, 2024

Hey @maeddin , thanks for your quick reply and action. I had a look, and it is very nice! Also, you added some more info in this TapInfo class that could definitely be useful. 👍

A comment on naming: I had a bit of a struggle understanding that current was actually referring to the previous value before tapping, because as I see it, the TapInfo refers to the tap action, so the word "current" would be IMO more about where we tapped right now. I would replace current (and currentIndex) with previous (and previousIndex). But this might be only my opinion 🙂

Other than this nitpick, the change seems good, and as a bonus, I could do exactly what I wanted to do, with limited changes to my code, so thank you very much 💪

from animated_toggle_switch.

maeddin avatar maeddin commented on July 23, 2024

Thanks for the detailed feedback 🙂

Yes, the naming of current can be confusing, but previous is also not true because a tap not necessarily triggers onChanged and changes the value. I will think again how to name this best. Otherwise I can also remove current, so it doesn't lead to confusion.

from animated_toggle_switch.

OroshiX avatar OroshiX commented on July 23, 2024

Maybe beforeTap (and beforeTapIndex) instead? It doesn't seem to imply a change on the value 🤔
Removing current would also be fine by me, no strong opinion on my side.

from animated_toggle_switch.

maeddin avatar maeddin commented on July 23, 2024

@OroshiX I changed the parameters for onTap a little bit. Is the new structure still somewhat understandable?
Sorry to bother you, but I need an opinion apart from my own 😅

from animated_toggle_switch.

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.