DavidVollmers / Ignis

The Blazor framework for building modern web applications.
https://ignis.dvolper.dev
MIT License
150 stars 8 forks source link

Refactor internal frame tracking & time handling #29

Closed DavidVollmers closed 1 year ago

DavidVollmers commented 1 year ago

This PR refactors the internal FrameTracker class to have consistent frame tracking available for all components. This PR also introduces a small implementation of the future .NET 8 TimeProvider class and the ITimer interface to not rely on Task.Delay anymore.

This fixes a couple of problems when combining multiple Transition, TransitionChild and other opening/closing components (e.g. Listbox or Dialog).

codecov[bot] commented 1 year ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (68ee70c) 38.72% compared to head (39185e5) 43.42%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #29 +/- ## ========================================== + Coverage 38.72% 43.42% +4.69% ========================================== Files 75 77 +2 Lines 2577 2593 +16 ========================================== + Hits 998 1126 +128 + Misses 1579 1467 -112 ``` | [Files](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper) | Coverage Δ | | |---|---|---| | [packages/Ignis.Components/FrameTracker.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvSWduaXMuQ29tcG9uZW50cy9GcmFtZVRyYWNrZXIuY3M=) | `100.00% <100.00%> (+11.11%)` | :arrow_up: | | [...kages/Ignis.Components/IgnisComponentExtensions.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvSWduaXMuQ29tcG9uZW50cy9JZ25pc0NvbXBvbmVudEV4dGVuc2lvbnMuY3M=) | `56.60% <100.00%> (+0.83%)` | :arrow_up: | | [...ges/Tailwind/Ignis.Components.HeadlessUI/Dialog.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvVGFpbHdpbmQvSWduaXMuQ29tcG9uZW50cy5IZWFkbGVzc1VJL0RpYWxvZy5jcw==) | `75.26% <100.00%> (-2.16%)` | :arrow_down: | | [...HeadlessUI/OpenCloseWithTransitionComponentBase.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvVGFpbHdpbmQvSWduaXMuQ29tcG9uZW50cy5IZWFkbGVzc1VJL09wZW5DbG9zZVdpdGhUcmFuc2l0aW9uQ29tcG9uZW50QmFzZS5jcw==) | `80.00% <100.00%> (+22.85%)` | :arrow_up: | | [...Tailwind/Ignis.Components.HeadlessUI/Transition.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvVGFpbHdpbmQvSWduaXMuQ29tcG9uZW50cy5IZWFkbGVzc1VJL1RyYW5zaXRpb24uY3M=) | `95.96% <100.00%> (+4.83%)` | :arrow_up: | | [packages/Ignis.Components/TimeProvider.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvSWduaXMuQ29tcG9uZW50cy9UaW1lUHJvdmlkZXIuY3M=) | `0.00% <0.00%> (ø)` | | | [...wind/Ignis.Components.HeadlessUI/TransitionBase.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvVGFpbHdpbmQvSWduaXMuQ29tcG9uZW50cy5IZWFkbGVzc1VJL1RyYW5zaXRpb25CYXNlLmNz) | `93.13% <96.66%> (+1.09%)` | :arrow_up: | | [packages/Ignis.Components/TimerImplementation.cs](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper#diff-cGFja2FnZXMvSWduaXMuQ29tcG9uZW50cy9UaW1lckltcGxlbWVudGF0aW9uLmNz) | `0.00% <0.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/DavidVollmers/Ignis/pull/29/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dvolper)

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