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: Add slot for custom controls in absolute range date picker #531

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

just-boris
Copy link
Member

Description

Allow to render a custom control in absolute selection mode. Check the new custom-control.page.tsx demo for usage example.

Related links, issue #, if available: n/a

How has this been tested?

Locally, build in my dev-pipeline (link in DM)

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@just-boris just-boris requested a review from a team as a code owner November 25, 2022 16:19
@just-boris just-boris requested review from pan-kot and removed request for a team November 25, 2022 16:19
@@ -38,10 +38,6 @@ $calendar-header-color: awsui.$color-text-body-default;
}

.calendar {
display: block;
width: 100%;
margin-bottom: awsui.$space-scaled-s;
Copy link
Member Author

Choose a reason for hiding this comment

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

Replaced this with SpaceBetween component. Screenshot tests shown no difference

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Base: 92.58% // Head: 92.58% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (4a4a29a) compared to base (1095cef).
Patch coverage: 88.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #531   +/-   ##
=======================================
  Coverage   92.58%   92.58%           
=======================================
  Files         569      569           
  Lines       16162    16174   +12     
  Branches     4419     4421    +2     
=======================================
+ Hits        14963    14975   +12     
  Misses       1118     1118           
  Partials       81       81           
Impacted Files Coverage Δ
src/date-range-picker/calendar/index.tsx 95.74% <84.21%> (+0.50%) ⬆️
src/date-range-picker/calendar/utils.ts 77.77% <100.00%> (ø)
src/date-range-picker/dropdown.tsx 100.00% <100.00%> (ø)
src/date-range-picker/index.tsx 98.07% <100.00%> (+0.01%) ⬆️
src/date-range-picker/utils.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +37 to +42
{
value: [{ start: { date: '', time: '' }, end: { date: '', time: '' } }],
setValue: [() => {}],
i18nStrings: [i18nStrings],
customAbsoluteRangeControl: [() => 'Custom control'],
},
Copy link
Member Author

Choose a reason for hiding this comment

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

This addition caused visual regression tests to fail (backstop does not automatically detect and skip added permutations, unlike our internal engine).

All other tests are good

@just-boris just-boris force-pushed the drp-absolute-shortcuts branch from 82b86dc to fd1e578 Compare November 28, 2022 14:55
@just-boris just-boris force-pushed the drp-absolute-shortcuts branch from fd1e578 to 4a4a29a Compare November 28, 2022 16:03
Copy link
Member

@pan-kot pan-kot left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants