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

When TextTruncator in Lesson Resource cards unmounts, it flashes un-truncated text and has unhandled errors #7982

Closed
jonboiser opened this issue Apr 8, 2021 · 0 comments · Fixed by #8101
Assignees
Labels
bug Behavior is wrong or broken P2 - normal Priority: Nice to have
Milestone

Comments

@jonboiser
Copy link
Contributor

jonboiser commented Apr 8, 2021

Observed behavior

Problem 1: Shave.js stops truncating text right before navigation

Here, the card will expand after I click it

CleanShot 2021-04-08 at 14 28 39

Problem 2: debounced callback in TextTruncator gets called after it is destroyed, causing errors in the console

image

Root cause

I think you need to look at the watcher for currentDimensions in TextTruncator.vue. It seems to be calling the handleUpdate callback, at inappropriate times during the component lifecycle. Possibly, it should not do anything when the component is about to be destroyed.

Expected behavior

1.For Problem 1: The card should remain visually the same until it is completely unmounted. It should not briefly flash the untruncated resource description.
2. For Problem 2: The debounced function should not be called when the card is about to be unmounted. Or else, the error is handled or avoided.

Steps to reproduce

  1. Download the QA channel with ID 95a52b386f2c485cb97dd60901674a98
  2. Navigate it in the lesson creation workflow.

Context

0.14.7

@jonboiser jonboiser added the bug Behavior is wrong or broken label Apr 8, 2021
@jonboiser jonboiser added this to the 0.14.8 milestone Apr 8, 2021
@jonboiser jonboiser modified the milestones: 0.14.8, 0.15.0 Apr 20, 2021
@jonboiser jonboiser added the P2 - normal Priority: Nice to have label May 7, 2021
@jonboiser jonboiser self-assigned this May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Behavior is wrong or broken P2 - normal Priority: Nice to have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant