appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.67k stars 3.75k forks source link

chore: add datepicker component #37563

Closed jsartisan closed 3 hours ago

jsartisan commented 3 days ago

Added daterpicker component along with other components needed for it like Calendar andTimeField

Datepicker CleanShot 2024-11-21 at 12 38 20@2x

Calendar CleanShot 2024-11-21 at 12 38 54@2x

Timefield CleanShot 2024-11-21 at 12 41 56@2x

/ok-to-test tags="@tag.Anvil"

Summary by CodeRabbit

Release Notes

[!TIP] 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11970103158 Commit: a1a552cb0bfdc9754341de5db0a6d8b142479083 Cypress dashboard. Tags: @tag.Anvil Spec:


Fri, 22 Nov 2024 10:01:23 UTC

coderabbitai[bot] commented 3 days ago

Walkthrough

A new set of components has been introduced in the design system, including Calendar, CalendarCell, CalendarHeaderCell, CalendarHeading, DatePicker, and TimeField. These components are designed to enhance date and time selection functionalities within the application. Alongside these, CSS styles and Storybook stories have been added to support their usage and visualization. The TextInput component has been renamed to TextField, updating various references throughout the codebase.

Changes

File Change Summary
app/client/packages/design-system/widgets/src/components/Calendar/src/Calendar.tsx Added Calendar component and associated props type.
app/client/packages/design-system/widgets/src/components/Calendar/src/CalendarCell.tsx Introduced CalendarCell component with props type.
app/client/packages/design-system/widgets/src/components/Calendar/src/CalendarHeaderCell.tsx Added CalendarHeaderCell component and props type.
app/client/packages/design-system/widgets/src/components/Calendar/src/CalendarHeading.tsx Introduced CalendarHeading component.
app/client/packages/design-system/widgets/src/components/Calendar/src/index.ts Exported Calendar, CalendarCell, CalendarHeading, and CalendarHeaderCell.
app/client/packages/design-system/widgets/src/components/Calendar/src/styles.module.css Added styles for the calendar component.
app/client/packages/design-system/widgets/src/components/Calendar/stories/Calendar.stories.tsx Created Storybook stories for Calendar with various configurations.
app/client/packages/design-system/widgets/src/components/Datepicker/src/Datepicker.tsx Introduced DatePicker component with comprehensive date selection features.
app/client/packages/design-system/widgets/src/components/Datepicker/src/DatepickerTrigger.tsx Added DatepickerTrigger component for user interaction.
app/client/packages/design-system/widgets/src/components/Datepicker/src/index.ts Exported DatePicker, types, and styles.
app/client/packages/design-system/widgets/src/components/Datepicker/src/styles.module.css Added styles for the Datepicker component.
app/client/packages/design-system/widgets/src/components/Datepicker/src/types.ts Defined types for DatePicker component.
app/client/packages/design-system/widgets/src/components/Datepicker/stories/Datepicker.stories.tsx Created Storybook stories for DatePicker.
app/client/packages/design-system/widgets/src/components/TextField/src/TextField.tsx Renamed TextInput to TextField and updated type references.
app/client/packages/design-system/widgets/src/components/TextField/src/index.ts Exported TextField and its props type.
app/client/packages/design-system/widgets/src/components/TextField/src/types.ts Renamed TextInputProps to TextFieldProps.
app/client/packages/design-system/widgets/src/components/TextField/stories/TextField.stories.tsx Updated Storybook stories to reflect the TextField component.
app/client/packages/design-system/widgets/src/index.ts Updated exports to include new components and rename TextInput to TextField.
app/client/src/modules/ui-builder/ui/wds/WDSInputWidget/component/index.tsx Updated import from TextInput to TextField.
app/client/src/modules/ui-builder/ui/wds/WDSCurrencyInputWidget/component/index.tsx Updated import from TextInput to TextField.
app/client/src/modules/ui-builder/ui/wds/WDSPhoneInputWidget/component/index.tsx Updated import from TextInput to TextField.
app/client/src/modules/ui-builder/ui/wds/WDSTableWidget/component/TableHeader/PageNumberInput.tsx Updated import from TextInput to TextField.
app/client/src/modules/ui-builder/ui/wds/WDSTableWidget/component/TableHeader/Search.tsx Updated import from TextInput to TextField.
app/client/packages/design-system/widgets/src/components/Popover/src/Popover.tsx Modified Popover to accept a className prop.
app/client/packages/design-system/widgets/src/testing/ComplexForm.tsx Updated instances of TextInput to TextField.

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

πŸŽ‰ In the realm of code, new components arise,
A calendar, a datepicker, a time field that flies!
With styles and stories, they come into view,
Renamed TextField, now fresh and anew!
So let’s celebrate this code, oh what a delight,
For in this design system, everything feels right! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❀️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
πŸͺ§ Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.