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: pickers: changeonblur and button props with option to hide buttons #696

Conversation

dkilgore-eightfold
Copy link
Collaborator

@dkilgore-eightfold dkilgore-eightfold commented Aug 23, 2023

SUMMARY:

  • Adds changeOnBlur prop to the pickers with a default value of true so people don't need to click on the OK button
  • Adds nowButtonProps, okButtonProps and todayButtonProps as an option to customize buttons
  • Adds todayActive to provide an option to remove active styles from the current date cell
  • Adds showOk and showToday props to give the option whether or not to render them in the UI
  • Updates showNow so it works as expected (toggle the display of the 'Now' button)
  • Adds and updates unit tests to account for changeOnBlur
  • Adds and updates Storybook stories

DatePicker
https://github.com/EightfoldAI/octuple/assets/99700808/c4935710-35ed-4441-9c2a-4fa22cb6d049

TimePicker
https://github.com/EightfoldAI/octuple/assets/99700808/67b3631b-5190-47a1-be3a-ecfbbcfa7261

JIRA TASK (Eightfold Employees Only):

ENG-54451
ENG-61020
ENG-62648
ENG-62649
ENG-62650
ENG-62651
ENG-62652
ENG-62653

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Pull the PR branch and run yarn and yarn storybook. Verify the DatePicker and TimePicker stories behave as expected.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 23, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 031dbb2:

Sandbox Source
React Configuration
Vanilla Configuration

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 90.59% and project coverage change: -0.03% ⚠️

Comparison is base (cbfc558) 85.15% compared to head (031dbb2) 85.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #696      +/-   ##
==========================================
- Coverage   85.15%   85.13%   -0.03%     
==========================================
  Files         881      883       +2     
  Lines       17971    18067      +96     
  Branches     6460     6497      +37     
==========================================
+ Hits        15304    15382      +78     
- Misses       2595     2613      +18     
  Partials       72       72              
Files Changed Coverage Δ
...ts/DateTimePicker/DatePicker/Generate/Generate.tsx 100.00% <ø> (ø)
...ePicker/Internal/Partials/DatePartial/DateBody.tsx 91.30% <ø> (ø)
...ker/Internal/Partials/DatetimePartial/Datetime.tsx 98.24% <ø> (ø)
.../DateTimePicker/Internal/Tests/util/commonUtil.tsx 70.49% <59.45%> (-17.01%) ⬇️
...rc/components/DateTimePicker/Internal/OcPicker.tsx 97.94% <89.47%> (-1.35%) ⬇️
...mponents/DateTimePicker/Internal/OcRangePicker.tsx 97.79% <96.49%> (+0.57%) ⬆️
...Picker/DatePicker/Generate/generateRangePicker.tsx 84.04% <100.00%> (+0.70%) ⬆️
...icker/DatePicker/Generate/generateSinglePicker.tsx 88.07% <100.00%> (+0.33%) ⬆️
...DateTimePicker/Internal/Hooks/useCellClassNames.ts 100.00% <100.00%> (ø)
...ts/DateTimePicker/Internal/Hooks/usePickerInput.ts 98.73% <100.00%> (ø)
... and 6 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dkilgore-eightfold dkilgore-eightfold merged commit 0a08831 into EightfoldAI:main Aug 25, 2023
4 of 6 checks passed
dkilgore-eightfold added a commit that referenced this pull request Sep 6, 2023
* fix: pagination: Issues with VisiblePagerCountSize (#610)

* chore: systemuibutton: pass transparent down via props (#611)

* chore(release): 2.36.0

* fix: select: ensure aria attributes target the intended element (#612)

* fix: select: ensure aria attributes target the intended element

* chore: dropdown: add ariaref ut and refine role null check

* chore: dropdown: update role null check to handle all elements

* chore(release): 2.36.1

* fix: stepper: handle scrollIntoView for both layouts on mount (#613)

* chore(release): 2.36.2

* fix: button: pass disruptive down from props to button from defaultbutton (#614)

* fix: dropdown: tweak css slideupin animation (#618)

* fix: dropdown: tweak css slideupin animation

* chore: dropdown: tweak animation curve and revert previous adjustment

* fix: locale: add support for hi locale (#602)

* fix: dropdown: fix visible prop (#616)

* fix: dropdown: fix visible prop

* chore: dropdown: update ut to open dropdown again

* feat: empty: enable themes and adds two additional modes (#619)

* chore: css: organize and annotate global variables (#621)

* chore: css: organize and annotate global variables

* chore: css: remove unused base color sass variables

* chore(release): 2.37.0

* feat: messagebar: add message bar component (#622)

* feat: messagebar: add message bar component

* chore: messagebar: update icons per spec

* chore: messagebar: export component

* chore: messagebar: address pr feedback by adding a mapping

* fix: css: global css variable name alignment with design specification (#625)

* feat: rename background-color to background (#628)

* feat: rename background-color to background

* Use background for button css so that we can have more flexible customizations

* fix: remove changes

* remove changes

* fix: table: fix loading compare and updates default spinner size and position (#627)

* fix: table: fix loading compare and updates default spinner size and position

* chore: table�: inherit spinner div height

* fix: pill: ensure pill heights match latest design specification (#626)

* fix: pill: ensure pill heights match latest design specification

* chore: pill: address pr feedback and move pill border radius to global css var

* feat: table: adds column border and disable row bg hover color props (#624)

* fix: select: ensure medium and large pills fit inside inputs of same size (#630)

* chore(release): 2.38.0

* feat: icon: add icons to support kanban view (#632)

* feat: icon: add icons to support integration system simplification (#634)

* fix: slider: increase vertical hit target and handle segmented gap clicks (#635)

* fix: slider: increase vertical hit target and handle segmented gap clicks

* fix: slider: ensure default behavior of tooltip does not hide on reference click

* fix: select: Update selected option based on defaultValue when isLoading changes. (#631)

Co-authored-by: Dylan <99700808+dkilgore-eightfold@users.noreply.github.com>

* feat: icon: add collapse icon for kanban (#637)

* chore: v2.38.2 hotfix fi to main (#638)

* fix: dropdown: revert useonclickoutside to only toggle in specific conditions

* chore(release): 2.38.1

* feat: custom fonts support via configProvider

* fix: remove unnecessary import

* chore(release): 2.38.2

* chore: semver: revert hotfix versioning ahead of fi

---------

Co-authored-by: Jeff Howard <106610186+jhoward-eightfold@users.noreply.github.com>

* fix: button: ensure loading dots use text color and enable two state loader (#636)

* fix: button: ensure loading dots use text color and enable two state loader

* chore: loader: address pr feedback by removing unneeded rtl code

* chore(release): 2.39.0

* fix: select: revert update selected option based on defaultValue when isLoading (#643)

* chore(release): 2.39.1

* fix: linkbutton: ensure default width matches min and max width (#640)

* fix: matchscore: color contrast and vertical alignment fix up (#641)

* fix: tabs: pill variant color contrast fix up (#642)

* fix: table: various accessibility improvements (#644)

* chore(release): 2.40.0

* fix: select: Update selected option based on defaultValue when isLoading changes (#646)

* fix: picker: color contrast ratio fixes (#647)

* fix: picker: color contrast ratio fixes

* chore: picker: address pr feedback remove unused css vars and selectors

* chore: storybook: update named export order to be more consistent using babel (#649)

* chore: storybook: update named export order to be more consistent using babel

* chore: storybook: removes redundant prop

* chore(deps-dev): bump webpack from 5.64.4 to 5.76.0 (#564)

Bumps [webpack](https://github.com/webpack/webpack) from 5.64.4 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.64.4...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan <99700808+dkilgore-eightfold@users.noreply.github.com>

* chore(deps-dev): bump semver from 7.3.5 to 7.5.2 (#650)

Bumps [semver](https://github.com/npm/node-semver) from 7.3.5 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.5...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: slider: ensure tooltip is visually hidden when slider is disabled (#651)

* fix: menu: add htmltype prop to menu item button (#654)

* fix: menu: add htmltype prop to menu item button

* chore: menu: update snaps to account for new default property

* feat: breadcrumb: add breadcrumb component (#629)

* fix: slider: fixes hidetrack and hiderail props typos and ommissions (#656)

* fix: slider: fixes hidetrack and hiderail props typos and ommissions

* chore: slider: adds hidetrack and hiderail unit tests

* chore: slider: swaps hidetrack and hiderail references of segments

* fix: table: updates scrollable div by removing deprecated css property (#655)

* fix: table: updates scrollable div by removing deprecated css property

* chore: table: update snaps

* chore: table: update border to hide in mozilla browsers

* chore: table: updates snaps and sticky unit test

* chore(release): 2.41.0

* feat: selectors: add var theme support to check box radio and toggle (#659)

* feat: selectors: add var theme support to check box radio and toggle

* chore: selectors: reverts transition change to limit scope

* chore: selectors: address pr feedback

* chore: dropdown: adds advanced visibility story and unit tests (#661)

* chore: css: remove redundant font stack sass and use semantic variable (#660)

* feat: persistentbar: support small screens and themes plus custom render (#667)

* feat: persistentbar: support small screens and themes plus custom render

* chore: persistentbar: address peer feedback and add css vars with border opt

* chore: coverage: adds unit tests to components that need them (#670)

* chore: coverage: adds unit tests to components that need them

* chore: coverage: test for skeleton variant

* fix: select: adds fall back and optional chaining to avoid null reference errors at runtime (#669)

* fix: select: adds optional chaining to avoid null reference errors at runtime

* chore: select: fall back to empty array rather than use optional chain

* feat: slider and progress: add ability to visually hide borders (#673)

* feat: slider: add ability to visually hide rail and track borders

* feat: progress: enable discreet theming and border manipulation via props and css

* chore(release): 2.42.0

* feat: infobar: adds bordered prop (#676)

* feat: infobar: adds bordered prop

* chore: infobar: align naming convention of css variables

* chore(deps): bump tough-cookie from 4.0.0 to 4.1.3 (#664)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan <99700808+dkilgore-eightfold@users.noreply.github.com>

* chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#671)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan <99700808+dkilgore-eightfold@users.noreply.github.com>

* chore: documentation: updates readme and contributing markdown files (#677)

* fix: table: adds default overflow back to latest scroll bars mixin (#678)

* chore: codescan: create sonarqube yml

* chore: codescan: update sonarqube yml

* chore: codescan: update sonarqube yml secret

* chore: codescan: update sonarqube yml args

* chore: codescan: update sonarqube yml syntax

* chore: codescan: create sonar project properties file

* chore: codescan: update sonarqube yml defer to properties file

* chore: codescan: move sonar properties file to root (#679)

* chore: codescan: update sonarqube yml to use input rather than env vars

* chore: codescan: revert sonarqube yml change and exclude github secret

* chore: codescan: update sonarqube yml to use pull request target

* chore: codescan: update sonarqube yml pull request type

* chore: publish: update npm publish yml repo email alias

* fix: accordion: fixes scroll bar animation flicker (#680)

* feat: card: update card size prop and remove bunko story (#682)

* chore(release): 2.43.0

* fix: popup: fixes style inheritance of reference element (#675)

* fix: popup: fixes style inheritance of reference element

* chore: popup: handle invalid react element

* feat: badge: add badge size and update button and tab custom css (#672)

* feat: badge: add badge size and update button and tab custom css

* chore: coverage: adds more badge tests

* chore: i18n: exports octuple locales and locale type (#684)

* chore: i18n: exports octuple locales and locale type

* chore: i18n: moves locale to separate entry

* chore: i18n: apply structure

* chore: governance: add security policy (#689)

* fix: tooltip: fixes tooltip toggle on mobile devices (#668)

* fix: tooltip: fixes tooltip toggle on mobile devices

* chore: tooltip: adds click toggle unit test

* chore: coverage: adds tooltip and mobile detector tests

* chore: popup: adds istouching method to test for hybrid devices

* chore: popup: update function name and ensure cloned element props are preserved

* fix: button: moves button transition to global semantic variables (#695)

* chore: icons: add new icon mdiAccountMultiplePlusOutline (#697)

* feat: selectors: adds checkbox indeterminate state and selector pill variants (#694)

* feat: selectors: adds checkbox indeterminate state and selector pill variants

* chore: selectors: export types and add another checkbox unit test

* fix: textarea: ensure grip icon doesn't block mouse drag (#698)

* feat: pickers: changeonblur and button props with option to hide buttons (#696)

* feat: pickers: changeonblur and button props with option to hide buttons

* chore: pickers: adds unit tests and updates showtoday default

* chore(release): 2.44.0

* fix: tooltip: fixes default clone element class names (#699)

* fix: carousel: add controls prop to scroll menu (#705)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ranjith Nori <106535945+rnori-eightfold@users.noreply.github.com>
Co-authored-by: Yash raj chhabra <95337653+ychhabra-eightfold@users.noreply.github.com>
Co-authored-by: Yash Raj Chhabra <ychhabra@eightfold.ai>
Co-authored-by: dcoblentz-eightfold <119535119+dcoblentz-eightfold@users.noreply.github.com>
Co-authored-by: Utsav Singhal <84313406+usinghal-eightfold@users.noreply.github.com>
Co-authored-by: Aryan Mediratta <64970674+aryan-eightfold@users.noreply.github.com>
Co-authored-by: Purushottam Tiwari <133845170+ptiwari-eightfold@users.noreply.github.com>
Co-authored-by: Jeff Howard <106610186+jhoward-eightfold@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhishek Gupta <agupta@eightfold.ai>
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.

None yet

2 participants