ui icon indicating copy to clipboard operation
ui copied to clipboard

Fix: Calendar Component Width Flexiblity

Open Sepehrworklife opened this issue 1 year ago • 5 comments

Description

This pull request addresses the issue where the Calendar component had a static size and did not adjust when the container width changed. The component now dynamically resizes its cells based on the width of its container, ensuring a responsive and consistent user experience across different screen sizes and container widths.

Related Issue

Fixes [#3996 ] - Calendar Component Width is Not Flexible

Testing

  • Verified that the Calendar component resizes its cells dynamically when the container width changes.
  • Tested across various screen sizes to ensure responsive behavior.
shadcn-ui:test:  ✓ test/utils/resolve-import.test.ts  (3 tests) 11ms
shadcn-ui:test:  ✓ test/utils/get-package-manager.test.ts  (1 test) 10ms
shadcn-ui:test:  ✓ test/utils/get-config.test.ts  (2 tests) 32ms
shadcn-ui:test:  ✓ test/utils/get-item-target-path.test.ts  (1 test) 15ms
shadcn-ui:test:  ✓ test/utils/get-tailwind-css-file.test.ts  (5 tests) 18ms
shadcn-ui:test:  ✓ test/utils/get-project-type.test.ts  (6 tests) 22ms
shadcn-ui:test:  ✓ test/commands/init.test.ts  (2 tests) 18ms
shadcn-ui:test:  ✓ test/utils/transform-rsc.test.ts  (1 test) 35ms
shadcn-ui:test:  ✓ test/utils/transform-import.test.ts  (1 test) 47ms
shadcn-ui:test:  ✓ test/utils/transform-css-vars.test.ts  (1 test) 56ms
shadcn-ui:test:  ✓ test/utils/transform-tw-prefix.test.ts  (1 test) 114ms
shadcn-ui:test:  ✓ test/utils/registry.test.ts  (1 test) 6ms
shadcn-ui:test:  ✓ test/utils/get-ts-config-alias-prefix.test.ts  (5 tests) 7ms
shadcn-ui:test:  ✓ test/utils/apply-color-mapping.test.ts  (13 tests) 5ms
shadcn-ui:test:  ✓ test/utils/apply-prefix.test.ts  (6 tests) 3ms
shadcn-ui:test:  ✓ test/utils/is-typescript-project.test.ts  (6 tests) 3ms
shadcn-ui:test: 
shadcn-ui:test:  Test Files  16 passed (16)
shadcn-ui:test:       Tests  55 passed (55)
shadcn-ui:test:    Start at  16:03:40
shadcn-ui:test:    Duration  2.10s (transform 487ms, setup 2ms, collect 5.50s, tests 402ms, environment 3ms, prepare 1.68s)
shadcn-ui:test: 

 Tasks:    1 successful, 1 total
Cached:    0 cached, 1 total
  Time:    2.686s 

Before

shadcnui-pr-not-fixed-1

After

shadcn-pr-after-fix-3 shadcn-pr-after-fix-2

Sepehrworklife avatar Jun 14 '24 12:06 Sepehrworklife

@Sepehrworklife is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 14 '24 12:06 vercel[bot]

thank you for your work on this @Sepehrworklife ! @shadcn bumping this for visibility

pppdns avatar Nov 14 '24 15:11 pppdns

can you guys resolve this please

daFoggo avatar Dec 14 '24 02:12 daFoggo

can you guys resolve this please

I second this. The fix would be greatly appreciated and allow for the calendar to be used in more versatile situations with ease.

Ezequiel-Valencia avatar Dec 18 '24 01:12 Ezequiel-Valencia

Could you review this?

blobmold avatar Dec 28 '24 23:12 blobmold

Can you guys solve the conflict and merge it so that anyone could easily have access to it ? @shadcn

yirmeyahu-d avatar May 23 '25 11:05 yirmeyahu-d

Is this going to be merged anytime soon?

Shaker-Hamdi avatar May 29 '25 15:05 Shaker-Hamdi

@Sepehrworklife We went into a different direction for handling cell sizes. See https://ui.shadcn.com/docs/components/calendar#custom-cell-size

Thanks for your work on this. Appreciate it.

shadcn avatar Oct 26 '25 11:10 shadcn