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

Don't refetch pinned project list more than we need to #472

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

eyeseast
Copy link
Collaborator

The computed property was causing a recurring fetch.

Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for documentcloud-frontend ready!

Name Link
🔨 Latest commit 6364e4f
🔍 Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/65f9caea4d5e270008022440
😎 Deploy Preview https://deploy-preview-472.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 19, 2024

Deploy Preview for documentcloud-frontend ready!

Name Link
🔨 Latest commit db1418d
🔍 Latest deploy log https://app.netlify.com/sites/documentcloud-frontend/deploys/65f9ccb5cced700008cdf3e3
😎 Deploy Preview https://deploy-preview-472.muckcloud.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Mar 19, 2024

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements
2.81% (+0% 🔼)
1978/70458
🔴 Branches
3.05% (+0% 🔼)
925/30314
🔴 Functions
3.22% (+0% 🔼)
503/15603
🔴 Lines
2.85% (+0% 🔼)
1796/62983

Test suite run success

84 tests passing in 16 suites.

Report generated by 🧪jest coverage report action from db1418d

@eyeseast eyeseast requested a review from allanlasser March 19, 2024 17:34
@@ -36,9 +36,6 @@
if (!equal($pinStore, pinned)) $pinStore = sortPins(pinned);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was supposed to prevent the update loop, but it clearly wasn't.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Equality is as hard to check as it is to achieve.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the computed value was the issue, though. It told svelte to set the store value every time the store value changed, so it was always behind.

@eyeseast eyeseast merged commit 1841897 into master Mar 19, 2024
13 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