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

Fix issue with card preview links disappearing #7014

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

butzopower
Copy link
Contributor

This happens very frequently to me where the preview links just stop working after a refresh or accidental horizontal scroll turns into a browser back. This is especially difficult for new players who as runners are only able to see an installed unrezzed card via the preview link when trashing.

I think I've narrowed the issue down to a race condition where the card data isn't loaded yet when the checking functions are memoized and so further invocations don't contain the card data - I was able to reproduce this very consistently by deleting the cards from local storage and throttling the browser requests.

The attached video shows the very simple fix of passing the card loaded state to the memoized function to ensure memoization remains but allows for refresh when cards are loaded.

preview-refresh-720.mov

@butzopower
Copy link
Contributor Author

butzopower commented Aug 10, 2023

Also happy to move fetching the card loaded state closer to the memoization/impl itself I just couldn't figure out how to do it in clojure with def and defn.

Figured this out and added a new commit that I think hides this better.

@NoahTheDuke NoahTheDuke merged commit 6983125 into mtgred:master Aug 16, 2023
3 checks passed
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.

2 participants