Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Separate hoverStart and hoverEnd from show/hide element #411

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JoseManuelFV
Copy link

@JoseManuelFV JoseManuelFV commented Oct 28, 2022

I added 3 feactures:

  1. Separate the onHoverStart and onHoverEnd from the hover element, because it was called from the onClick and onDismiss respectively, and I believe that the events should be worked separately, not that one should call the other one.
    For this feature I have created:
    · showElement: the name says it all
    · hideElement: the name says it all

  2. On the other hand, I have also added a feature, which has been requested by several people, which is to separate the hoverElement from the hover and show it only when onClick.
    For this feature I have created:
    · addClickElement: Same as addElement. But it automatically configures only the clickable element
    · addElement: Refactoring of the old addHoverElement method
    · removeElement: Refactoring of the old removeHoverElement method
    · addClickText: Same as addTextElement. But it automatically configures only the clickable element
    · addTextElement: Refactoring of the old addHoverText method
    · showHoverElement: Configuration for only clicable element

  3. I have added deprecated for:
    · removeHoverElement: Same as removeElement
    · addHoverElement: Same as removeElement
    · addHoverText: Same as addTextElement


The posts that mention/ask for this feature:
Feacture 1: #333 #268
Feacture 2: #394 #272

I think it is a good functionality to separate the onHoverStart and onHoverEnd from the hover element, because it was called from the onClick and onDismiss respectively.
for this feature I have created:
 · `showElement`: the name says it all
 · `hideElement`: the name says it all

On the other hand, I have also added a feature, which has been requested by several people, which is to separate the hoverElement from the hover and show it only when onClick. 
For this feature I have created:
 · `addClickElement`: Same as `addElement`. But it automatically configures only the clickable element
 · `addElement`: Refactoring of the old addHoverElement method
 · `removeElement`: Refactoring of the old removeHoverElement method
 · `addClickText`: Same as `addTextElement`. But it automatically configures only the clickable element
 · `addTextElement`: Refactoring of the old `addHoverText` method

And I have added deprecated for:
 · `addRemoveElement`: Same as `removeElement`
 · `addHoverElement`: Same as `removeElement`
 · `addHoverText`: Same as `addTextElement`
@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2022

This pull request introduces 1 alert when merging 913b423 into 562ff9d - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2022

This pull request introduces 1 alert when merging 295ef60 into 562ff9d - view on LGTM.com

new alerts:

  • 1 for Syntax error

@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2022

This pull request introduces 1 alert when merging 1fbe8da into 562ff9d - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant