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

[Feature] Action: add support for multiple events #299

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

titouanmathis
Copy link
Contributor

@titouanmathis titouanmathis commented Sep 20, 2024

πŸ”— Linked issue

#298

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR refactors the Action component to add support for multiple events. The existing API is still available, but we can now use new attributes to configure multiple events.

<button data-component="Action" data-option-on:click.prevent="App -> target.$update()">
  Update the App
</button>

Event, targets and effect can now be configured with a single attribute with the following pattern:

data-option-on:<event>[.<modifier>]="[<target>(<selector>) -> ]<effect>"

Test it in the playground.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

Copy link

github-actions bot commented Sep 20, 2024

Export Size

@studiometa/ui

Name Size Diff
Action 943 B +274 B (+40.96%) πŸ”Ί
ATOMS 5.47 kB +274 B (+5.27%) πŸ”Ί
ALL 13.04 kB +276 B (+2.16%) πŸ”Ί
Unchanged

@studiometa/ui

Name Size Diff
AbstractPrefetch 411 B -
AbstractScrollAnimation 461 B -
AbstractSliderChild 2.47 kB -
Accordion 1.06 kB -
AccordionItem 1.03 kB -
AnchorNav 616 B -
AnchorNavLink 485 B -
AnchorNavTarget 207 B -
AnchorScrollTo 249 B -
animationScrollWithEase 272 B -
CircularMarquee 339 B -
Cursor 665 B -
DataBind 699 B -
DataComputed 844 B -
DataEffect 815 B -
DataModel 771 B -
Draggable 327 B -
Figure 694 B -
FigureTwicpics 1.15 kB -
FigureVideo 983 B -
FigureVideoTwicpics 1.48 kB -
Frame 1.69 kB -
FrameAnchor 201 B -
FrameForm 198 B -
FrameTarget 777 B -
LargeText 492 B -
LazyInclude 422 B -
loadImage 694 B -
Menu 1.37 kB -
MenuBtn 235 B -
MenuList 943 B -
Modal 898 B -
ModalWithTransition 1.01 kB -
MOLECULES 7.13 kB -
ORGANISMS 1.75 kB -
Panel 1.25 kB -
PrefetchWhenOver 468 B -
PrefetchWhenVisible 480 B -
PRIMITIVES 632 B -
ScrollAnimation 513 B -
ScrollAnimationChild 650 B -
ScrollAnimationChildWithEase 851 B -
ScrollAnimationParent 712 B -
ScrollAnimationWithEase 711 B -
ScrollReveal 622 B -
Sentinel 217 B -
Slider 2.27 kB -
SliderBtn 2.64 kB -
SliderCount 2.51 kB -
SliderDots 2.73 kB -
SliderDrag 358 B -
SliderItem 733 B -
SliderProgress 2.55 kB -
Sticky 866 B -
TableOfContent 744 B -
TableOfContentAnchor 552 B -
Tabs 633 B -
Target 189 B -
Transition 387 B -

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 77.77%. Comparing base (72366ea) to head (cf29c5b).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #299      +/-   ##
===========================================
+ Coverage    77.42%   77.77%   +0.35%     
===========================================
  Files           91       92       +1     
  Lines         3171     3222      +51     
  Branches       278      288      +10     
===========================================
+ Hits          2455     2506      +51     
  Misses         716      716              
Flag Coverage Ξ”
unittests 77.77% <100.00%> (+0.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@titouanmathis titouanmathis marked this pull request as ready for review September 20, 2024 13:47
@titouanmathis titouanmathis merged commit 3b05192 into develop Sep 20, 2024
15 checks passed
@titouanmathis titouanmathis deleted the feature/action-multiple-events branch September 20, 2024 14:22
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.

1 participant