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

feat: Formatting numbers and allowing key navigation on datepicker #2443

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

tuva-odegard
Copy link
Contributor

@tuva-odegard tuva-odegard commented Dec 10, 2024

Forslag fra ønskelista.

Har jobbet med å få et mer strengt format på datepickeren.

Utfordringer med oppgaven

  • Datepicker er utdatert - og det er for stor oppgave å oppdatere i samme slengen
  • Det er utrolig mange edge caser ifb. med dato

Hva som er gjort

Det er implementert muligheten for et strengere format på datepickeren, altså at "dd.mm.yyyy" aldri fjerner ".".
Aria-labels og muligheten til å trykke opp og ned for å øke tallet er også stort sett på plass.

Note:
Det er en kjent bug som er at <label for="id"/> ikke fungerer som det skal, det objektet som får "for/id" er ikke et input-felt. I praksis betyr det at vi får en feil i validator her https://validator.w3.org/nu/#textarea, og at man ikke får fokus på feltet når man trykker på labelen. Vi har regnet det som ok med tanke på UU, siden skjermlesere fortsatt får lest opp label (ved bruk av aria-labelledby).

Breaking change

inputProps er fjernet. Props som onBlur, aria-describedby og aria-invalid kan sendes inn direkte. Placeholder er ikke vits lenger, feltet vil aldri være tomt.

@tuva-odegard tuva-odegard requested a review from a team as a code owner December 10, 2024 15:24
@antidecaf
Copy link
Contributor

chore: Formatting numbers and allowing key navigation on datepicker

Dette er vel snarere en feat og ikke en chore. :)
Commiten bør også deles i to og scopes til hhv ffe-datepicker-react og ffe-datepicker.

@tuva-odegard tuva-odegard force-pushed the datepicker-format-2 branch 2 times, most recently from 133a78f to e173855 Compare December 16, 2024 08:33
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

1 similar comment
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

1 similar comment
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Denne burde ikke sjekkes in

@pethel pethel changed the title chore: Formatting numbers and allowing key navigation on datepicker feat: Formatting numbers and allowing key navigation on datepicker Dec 17, 2024
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

min-width: 4ch;
}

&:focus {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jag tror du har rett her. focus-visible er alternativet men da blir den ikke blå på device.

@tuva-odegard tuva-odegard force-pushed the datepicker-format-2 branch 2 times, most recently from 633bf2e to fd667f7 Compare December 17, 2024 12:46
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

@tuva-odegard tuva-odegard force-pushed the datepicker-format-2 branch 2 times, most recently from 200d745 to d324eb9 Compare December 17, 2024 13:30
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

1 similar comment
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

BREAKING CHANGE: Fjernet inputProps. labelId påkrevd
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

1 similar comment
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-beach-0d62d0d03-2443.westeurope.2.azurestaticapps.net

@tuva-odegard tuva-odegard merged commit a787feb into develop Dec 17, 2024
3 checks passed
@tuva-odegard tuva-odegard deleted the datepicker-format-2 branch December 17, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants