mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
19 stars 22 forks source link

1970 canary date component playgrounds #2032

Open GCHQ-Developer-530 opened 1 week ago

GCHQ-Developer-530 commented 1 week ago

Summary of the changes

Add playground stories for date input and date picker

Ticket already created for startOfWeek not updating - https://github.com/mi6/ic-ui-kit/issues/1877

Related issue

Part of #1970

Checklist

General

Testing

Accessibility

Resize/zoom behaviour

System modes

Testing content extremes

github-actions[bot] commented 1 week ago

View your branch deployment here: https://mi6.github.io/ic-ui-kit/branches/1970-canary-date-comp-playgrounds/canary-web-components View your React branch deployment here: https://mi6.github.io/ic-ui-kit/branches/1970-canary-date-comp-playgrounds/canary-react View your NextJs branch deployment here: https://mi6.github.io/ic-ui-kit/branches/1970-canary-date-comp-playgrounds/nextjs

CLAassistant commented 1 week ago

CLA assistant check
All committers have signed the CLA.

ad9242 commented 6 days ago

There seems to be a problem where, if you have a value set, changing the date-format clears the field. I'd expect it to update the value, but that should be a new ticket as it doesn't support it at the moment (would need changes to input & picker i think)

GCHQ-Developer-530 commented 6 days ago

There seems to be a problem where, if you have a value set, changing the date-format clears the field. I'd expect it to update the value, but that should be a new ticket as it doesn't support it at the moment (would need changes to input & picker i think)

https://github.com/mi6/ic-ui-kit/issues/2056 created

GCHQ-Developer-530 commented 6 days ago

I think the blanking of the value may be a bigger issue, than just changing the date format. it seems to be that, if you have entered a value in the picker\input and then change a storybook control eg, disabled, then it blanks the value. I think this is because it re-uses the value from the storybook control.

you can keep them in sync with https://storybook.js.org/docs/addons/addons-api#useargs see checkbox playground for an example

Ah brilliant, thank you. I've updated it