Giter Site home page Giter Site logo

Comments (6)

Reckless-Satoshi avatar Reckless-Satoshi commented on September 25, 2024 1

Hey @Renato1478 . Indeed, this is a potentially useful feature.

The order book filtering only allows for one payment_method input at the moment. Several changes are needed as:

  • In desktop (large screens) the same Autocomplete field as seen in the Create page is used, however, it is limited to 1 entry.
  • On Mobile, it is a dropdown selection (so only 1 method allowed as well).

The filtering function, already accepts multiple payment methods:

const filterByPayment = function (order: PublicOrder, paymentMethods: any[]): boolean {
if (paymentMethods.length === 0) {
return true;
} else {
let result = false;
paymentMethods.forEach((method) => {
result = result || order.payment_method.includes(method.name);
});
return result;
}
};

I am not sure using the AutocompletePayment component on the Order book controls in mobile is a great idea, as selecting from a dropdown is way easier than writing on mobile. However, on desktop, it is likely very easy to fix the AutocomplePayment component on the book controls to accept several elements on the array of methods instead of just one.

If you want to work on it, we will gladly accept this PR. We can do a small tip from the devfund for the contribution of 20K Sats for this feature. Please, keep in mind our latest developments are in branch the-federation-layer-v0.6.0, so it would be best if you work on top of its tip commit :)

from robosats.

Reckless-Satoshi avatar Reckless-Satoshi commented on September 25, 2024 1

Hey @Renato1478 , yes this could work for both mobile and desktop! The only drawback is the extra two clicks needed to open and confirm the new dialog. It's hard to say, do you think those two extra clicks are worthy in order to gain the edge ability to filter by more than one payment method at once?

I think it's a good case to bring up in the telegram group and see how users feel about it. It is definitely worth to implement if most users always look for several payment methods at once.

from robosats.

Renato1478 avatar Renato1478 commented on September 25, 2024

I'm willing to work on this feature if it's considered relevant to the app.

from robosats.

Renato1478 avatar Renato1478 commented on September 25, 2024

from robosats.

Renato1478 avatar Renato1478 commented on September 25, 2024

Thanks for the reply! In respect on the extra clicks, I just opened the PR #1172 making this possible without creating extra clicks or the average user who wants to filter by just 1 method.

from robosats.

Reckless-Satoshi avatar Reckless-Satoshi commented on September 25, 2024

#1172 was merged!

from robosats.

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.