-
Couldn't load subscription status.
- Fork 8
CASH-1101: Disable hover temporarily after detailed panel is triggered #1036
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| :loan="loan" | ||
| :percent-raised="percentRaised" | ||
| :expanded="expanded" | ||
| @update-detailed-loan-index="hoverCardSmallUpdateDetailedLoanIndex" | ||
| /> | ||
| <hover-loan-card-large | ||
| :amount-left="amountLeft" | ||
|
|
@@ -34,7 +35,7 @@ | |
| :is-visitor="isVisitor" | ||
| :is-selected-by-another="isSelectedByAnother" | ||
| :items-in-basket="itemsInBasket" | ||
| @update-detailed-loan-index="updateDetailedLoanIndex" | ||
| @update-detailed-loan-index="hoverCardLargeUpdateDetailedLoanIndex" | ||
| /> | ||
| <div | ||
| class="more-details-wrapper" | ||
|
|
@@ -93,6 +94,10 @@ export default { | |
| type: Number, | ||
| default: 0, | ||
| }, | ||
| preventUpdatingDetailedCard: { | ||
| type: Boolean, | ||
| default: false, | ||
| }, | ||
| }, | ||
| computed: { | ||
| expanded() { | ||
|
|
@@ -133,7 +138,9 @@ export default { | |
| methods: { | ||
| handleMouseEnter() { | ||
| if (this.rowHasDetailedLoan && !this.isDetailed) { | ||
| this.updateDetailedLoanIndex(); | ||
| if (!this.preventUpdatingDetailedCard) { | ||
| this.updateDetailedLoanIndex(); | ||
| } | ||
| } else if (this.hoverEffectActive()) { | ||
| this.updateHoverLoanIndex(); | ||
| } | ||
|
|
@@ -170,12 +177,22 @@ export default { | |
| }, | ||
| handleClick() { | ||
| if (!this.hoverEffectActive()) { | ||
| this.$emit('update-detailed-loan-index', this.loanIndex); | ||
| this.updateDetailedLoanIndex(); | ||
| } | ||
| }, | ||
| trackInteraction(args) { | ||
| this.$emit('track-interaction', args); | ||
| }, | ||
| hoverCardLargeUpdateDetailedLoanIndex() { | ||
| if (!this.rowHasDetailedLoan) { | ||
| this.$emit('set-prevent-updating-detailed-card', true); | ||
| } | ||
| this.updateDetailedLoanIndex(); | ||
| }, | ||
| hoverCardSmallUpdateDetailedLoanIndex() { | ||
| this.$emit('set-prevent-updating-detailed-card', false); | ||
| this.updateDetailedLoanIndex(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interaction 2B: User explicitly clicks on a neighboring loan
|
||
| } | ||
| }, | ||
| }; | ||
| </script> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,9 +62,11 @@ | |
| :detailed-loan-index="detailedLoanIndex" | ||
| :hover-loan-index="hoverLoanIndex" | ||
| :shift-increment="calculateCardShiftIncrement(index)" | ||
| :prevent-updating-detailed-card="preventUpdatingDetailedCard" | ||
|
|
||
| @update-detailed-loan-index="updateDetailedLoanIndex" | ||
| @update-hover-loan-index="updateHoverLoanIndex" | ||
| @set-prevent-updating-detailed-card="handleSetPreventUpdatingDetailedCard" | ||
|
|
||
| ref="hoverLoanCards" | ||
| /> | ||
|
|
@@ -176,6 +178,7 @@ export default { | |
| detailedLoanIndex: null, | ||
| hoverLoanIndex: null, | ||
| cardWidth: hoverCardSmallWidthTotal, | ||
| preventUpdatingDetailedCard: false, | ||
| }; | ||
| }, | ||
| computed: { | ||
|
|
@@ -390,6 +393,13 @@ export default { | |
| }, | ||
| handleMouseLeave() { | ||
| this.hoverLoanIndex = null; | ||
| this.setPreventUpdatingDetailedCard(false); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interaction 2A: User exits the row (entering the DetailedLoanCard)
|
||
| }, | ||
| setPreventUpdatingDetailedCard(newState) { | ||
| this.preventUpdatingDetailedCard = newState; | ||
| }, | ||
| handleSetPreventUpdatingDetailedCard(newState) { | ||
| this.setPreventUpdatingDetailedCard(newState); | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interaction 1: User clicks on Image or Read more inside
HoverLoanCardLarge