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

remove asyncComputed from MergeTable #8388

Closed

Conversation

RayBB
Copy link
Collaborator

@RayBB RayBB commented Oct 6, 2023

Contributes to #7547 by helping us be able to upgrade to Vue 3!

Removes asyncComputed, which doesn't support Vue3. The beta library wasn't working either.

We don't need asyncComputed because the async values don't need to be "computed" more than once. We only have to wait for records before async fetching bookshelves, lists, editions, and ratings. Each of those 4 only need a tiny bit if post processing but never change after the intital request.

The new approach is to load those four right after we get the records in the created lifecycle step.

I'll walk through the code in the video.

Technical

This PR is a big refactor but none of the logic was not changed, just moved.

Testing

This really only impacts the loading of data so if you can see everything looks the same then we should be good to go.

Screenshot

Stakeholders

@jimchamp

@RayBB RayBB mentioned this pull request Oct 6, 2023
14 tasks
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

Merging #8388 (c114ecb) into master (ed4b30b) will not change coverage.
Report is 24 commits behind head on master.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #8388   +/-   ##
=======================================
  Coverage   16.62%   16.62%           
=======================================
  Files          84       84           
  Lines        4433     4433           
  Branches      758      758           
=======================================
  Hits          737      737           
  Misses       3212     3212           
  Partials      484      484           

@mekarpeles mekarpeles added the Priority: 1 Do this week, receiving emails, time sensitive, . [managed] label Oct 30, 2023
@mekarpeles
Copy link
Member

Howdy @RayBB, if @cdrini can help unblock you this week, that would be amazing -- if by Friday we don't have feedback, I'd like @jimchamp to help take this over the finish line, even if the solution may not be ideal (we can always fix things moving forward and iterate but blockers are going to prevent us from forward progress towards vue3 and we're getting down to the wire: December 31st)

@RayBB
Copy link
Collaborator Author

RayBB commented Nov 1, 2023

I talked with @cdrini about this PR very briefly on the phone. I addressed his comments best I could to improve naming.

I don't have a link now but this approach was mentioned in a forum about how to deal with a situation like this. Basically saying if you're not fetching more than once then fetch it in the created event hook to keep things simple.

I don't love this approach as asyncomputed is a bit less code but I think it's better than migrating to another library for this simple use case. If someone really wants to try to get the beta version of the asyncomputed library working then go for it but I didn't have luck. Just vague error messages.

As far as this PR goes: Modify it as you see fit (or make a new branch) or close it if you wanna migrate to the other library but I don't have energy this month to refactor it more. I updated the package.json again so it can be merged.

@RayBB
Copy link
Collaborator Author

RayBB commented Nov 6, 2023

@jimchamp @mekarpeles let me know if there are any further questions on this.

@cdrini
Copy link
Collaborator

cdrini commented Nov 6, 2023

Howdy! I'm taking a look at updating the source package to Vue 3 ; it seems like a not too complicated updated, and it would help a toooon of people who also rely on this package :) foxbenjaminfox/vue-async-computed#124

I'd like to see if the maintainer will give a response on this one. Help appreciated on the last question/testing on that PR!

@cdrini
Copy link
Collaborator

cdrini commented Nov 6, 2023

I'll drop this to p2 and revisit after this week! Hopefully we'll get a response from the maintainer

@cdrini cdrini added Priority: 2 Important, as time permits. [managed] State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed] and removed Priority: 1 Do this week, receiving emails, time sensitive, . [managed] labels Nov 6, 2023
@cdrini
Copy link
Collaborator

cdrini commented Nov 20, 2023

Closing this as we were able to get in contact with vue-async-computed and migrated them to Vue 3! We'll just have to update to the latest vue-async-computed when we migrate to Vue 3 👍

@cdrini cdrini closed this Nov 20, 2023
@RayBB
Copy link
Collaborator Author

RayBB commented Nov 20, 2023

Updated the vue 3 issue to reflect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed] State: Blocked Work has stopped, waiting for something (Info, Dependent fix, etc. See comments). [managed]
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants