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(components): add collapse component #16

Merged
merged 5 commits into from
May 25, 2024
Merged

feat(components): add collapse component #16

merged 5 commits into from
May 25, 2024

Conversation

desmondinho
Copy link
Contributor

@desmondinho desmondinho commented May 25, 2024

Description

Add the collapse component to the component library, as it is essential for other components like the Accordion.

Closes #15

What's been done?

  1. Added collapse component with the following abilities:

    • Set expanded state
    • The callback when a collapse/expand transition ends
  2. Added the GetScrollHeight extension for the ElementReference that invokes JS runtime.

  3. Added the getScrollHeight JavaScript script, which is invoked via the extension method mentioned above.

Checklist

  • My code follows the project's coding style and guidelines.
  • I have included inline docs for my changes, where applicable.
  • I have added, updated or removed tests according to my changes.
  • All tests are passing.
  • There's an open issue for the PR that I am making.

Additional Notes

Some of the tests have not been added due to a lack of knowledge on how to test complex cases like the ones in the OnAfterRenderAsync lifecycle method of the LumexCollapse component. I've left a TODO for the future.

@desmondinho desmondinho added ✨ Type: Enhancement New feature or request 📦 Scope: Components Improvements or additions to components labels May 25, 2024
@desmondinho desmondinho self-assigned this May 25, 2024
@desmondinho desmondinho linked an issue May 25, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented May 25, 2024

Codecov Report

Attention: Patch coverage is 80.32787% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 97.89%. Comparing base (4e630bb) to head (7727d40).

Files Patch % Lines
src/LumexUI/Components/Collapse/LumexCollapse.cs 78.57% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
- Coverage   99.54%   97.89%   -1.65%     
==========================================
  Files          27       28       +1     
  Lines         654      711      +57     
  Branches       43       56      +13     
==========================================
+ Hits          651      696      +45     
- Misses          1       12      +11     
- Partials        2        3       +1     

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

@desmondinho desmondinho merged commit 13655b4 into main May 25, 2024
2 of 3 checks passed
@desmondinho desmondinho deleted the feat/collapse branch May 25, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope: Components Improvements or additions to components ✨ Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add collapse component
1 participant