Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-6846] Added spaced card nubmer to the card view #3084

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moalhaddar
Copy link
Mannequin

@moalhaddar moalhaddar mannequin commented Mar 15, 2024

Type of change

  • [✅] Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

The card number in bitwarden mobile is not spaced in the mobile view. This pull request fixes the view such that the number is spaced in splits of 4.

Code changes

A new property in the CardView named SpacedNumber was added that adds a space in every 4 digits from the "CardView.Number"

@CLAassistant
Copy link
Mannequin

CLAassistant mannequin commented Mar 15, 2024

CLA assistant check
All committers have signed the CLA.

@bitwarden-bot
Copy link
Mannequin

bitwarden-bot mannequin commented Mar 15, 2024

Thank you for your contribution! We've added this to our internal Community PR board for review.
ID: PM-6846

@bitwarden-bot bitwarden-bot mannequin changed the title Added spaced card nubmer to the card view [PM-6846] Added spaced card nubmer to the card view Mar 15, 2024
@bitwarden-bot bitwarden-bot mannequin added the community-pr label Mar 15, 2024
@kyrias
Copy link
Mannequin

kyrias mannequin commented May 29, 2024

A space every 4 digits is only correct for 16-digit card numbers. There are many card types that don't have 16 digits where having spacing every 4 digits is always incorrect, e.g. American Express, but there are also Visa and Maestro card number ranges which aren't 16 digits and those also have different spacing requirements.

The other clients support this mostly properly (though unfortunately not for the edit view, where it's almost more important): https://github.com/bitwarden/clients/blob/9d342f61cb97e217756e04d1f6654642cb4768b2/libs/angular/src/pipes/credit-card-number.pipe.ts

@Gerardv514
Copy link

Is this still a work in progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants