hyperswitch-web icon indicating copy to clipboard operation
hyperswitch-web copied to clipboard

feat: unified view for saved and more payment methods screen

Open sakksham7 opened this issue 4 months ago • 5 comments

Type of Change

  • [ ] Bugfix
  • [X] New feature
  • [ ] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

Added a parameter inside layout object, named as savedMethodsLayout, it is an object having structure as

savedMethodsLayout : {
      displayMergedSavedMethods: bool,
      maxSavedItems: int,
    },

based upon which if there are saved payment methods and displayMergedSavedMethods is passed as true then instead of coming on a separate saved payment methods screen, it will come in either tabs flow or accordion flow depending upon the layout. maxSavedItems is used to configure how many saved methods we want to show initially and then the rest can be shown after clicking on show more.

https://github.com/user-attachments/assets/af014f80-75e7-40ee-961b-b3f48e79ae9f

How did you test it?

Tested the following cases for both Accordion view and Tabs View :-

  • When saved payment methods are present

  • displaySavedPaymentMethods is false, displayMergedSavedMethods is false or true No saved payment methods tab

  • displaySavedPaymentMethods is true, displayMergedSavedMethods is false Normal flow Saved payment methods screen

  • displaySavedPaymentMethods is true, displayMergedSavedMethods is true Saved payment methods in tabs or accordion

  • When No saved payment methods are present

  • each case will have no saved payment methods

Checklist

  • [X] I ran npm run re:build
  • [X] I reviewed submitted code
  • [ ] I added unit tests for my changes where possible

sakksham7 avatar Aug 17 '25 18:08 sakksham7

Review changes with  SemanticDiff

semanticdiff-com[bot] avatar Aug 17 '25 18:08 semanticdiff-com[bot]

Hmm. Quite confusing experience. If “Saved” implies all (saved) payment methods, why should it have a card icon. Right next it to is “Cards” with a card icon again. Worth revisiting

vsrivatsa-edinburgh avatar Aug 22 '25 04:08 vsrivatsa-edinburgh

Hmm. Quite confusing experience. If “Saved” implies all (saved) payment methods, why should it have a card icon. Right next it to is “Cards” with a card icon again. Worth revisiting

Thanks for pointing this out, we’ll revisit the icons.

sakksham7 avatar Aug 22 '25 06:08 sakksham7

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues. 🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

github-actions[bot] avatar Aug 28 '25 08:08 github-actions[bot]

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues. 🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

github-actions[bot] avatar Aug 28 '25 08:08 github-actions[bot]