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

DateRange: make onCancel and onSubmit events optional (web) #3812

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CarlosAvina
Copy link
Contributor

@CarlosAvina CarlosAvina commented Oct 18, 2024

Summary

Makes onCancel and onSubmit events optional props. This will also hide cancel and submit buttons.

What changed?

Makes onCancel and onSubmit events optional props. If those props are not passed then the component is going to hide the cancel and submit buttons.

Why?

The current DatePicker used in analytics doesn't have an apply button, the user is accustomed to an action to occur when the endDate is selected, the data fetching occurs currently on the endDateChange event. There is no onCancel or onSubmit business logic on our side. For accomplish this we don't need to change the logic of the component, we just need to conditionally render those buttons if the props are present.

Screenshots

Screenshot 2024-10-18 at 2 12 38 p m Screenshot 2024-10-18 at 2 12 26 p m

Links

  • Jira
  • [TDD](link to Paper doc)
  • [Figma](link to Figma file)

Checklist

  • Added unit tests
  • Added documentation + accessibility tests
  • Verified accessibility: keyboard & screen reader interaction
  • Checked dark mode, responsiveness, and right-to-left support
  • Checked stakeholder feedback (e.g. Gestalt designers, relevant feature teams)

Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for gestalt ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3607b5a
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/6712d603dbc6e8000845be20
😎 Deploy Preview https://deploy-preview-3812--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant