EightfoldAI / octuple

The Octuple component library
MIT License
16 stars 45 forks source link

fix: list: move external item into its own function component to address hook bug #792

Closed dkilgore-eightfold closed 4 months ago

dkilgore-eightfold commented 4 months ago

SUMMARY:

the uniqueId helper implements a useMemo hook. This caused an issue where the externalItem function of List raised React errors regarding hooks.

https://github.com/EightfoldAI/octuple/assets/99700808/ed99253d-8723-4f75-81e5-f645b1963d72

JIRA TASK (Eightfold Employees Only):

ENG-81890

CHANGE TYPE:

TEST COVERAGE:

TEST PLAN:

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

codesandbox-ci[bot] commented 4 months ago

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.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.38%. Comparing base (2b19d5c) to head (2967c62).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #792 +/- ## ========================================== - Coverage 84.38% 84.38% -0.01% ========================================== Files 1008 1009 +1 Lines 19893 19896 +3 Branches 7542 7540 -2 ========================================== + Hits 16787 16789 +2 - Misses 3023 3024 +1 Partials 83 83 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.