-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add pills for more Loadout Analysis / Warnings / Upgrade possibilities #10012
Add pills for more Loadout Analysis / Warnings / Upgrade possibilities #10012
Conversation
52cc1c1
to
a4d6435
Compare
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.
Epic! This was a great read, lots of fantastic changes in here. The feature works well and I'm excited to be able to surface all this advice to users - I think it'll help them discover LO as well.
} { | ||
autoStatMods: boolean, | ||
/** If set, only sets where at least one stat **exceeds** `resolvedStatConstraints` minimums will be returned */ | ||
strictUpgrades: boolean, |
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.
I see where you're going with this, and I love it!
@@ -60,7 +64,12 @@ export default function LoadoutsContainer({ account }: { account: DestinyAccount | |||
return <ShowPageLoading message={t('Loading.Profile')} />; | |||
} | |||
|
|||
return <Loadouts account={account} />; | |||
// TODO: how high in our tree do we want this analyzer? |
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.
This seems fine, though if you moved it down into Loadouts
I bet you could directly assign selectedStoreId
as a prop rather than having to use useUpdateLoadoutAnalysisContext
.
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.
I actually did that first but ran into the issue that the useSummaryLoadoutsAnalysis
hook also needs to exist in Loadouts and that one needs the context outside of it.
There's also a case to be made for placing it even higher in the tree (around our routes) since right now navigating away from the Loadouts page cleans up the analyzer and discards all results.
Co-authored-by: Ben Hollis <ben@benhollis.net>
20b52d6
to
56eddb1
Compare
Goals:
I previously did something similar in #9566 but it did not work well across components and abused React for task scheduling. This one uses a bit of a custom task queue for submitting loadouts for analysis, caching the results, and getting results asynchronously using
React.useSyncExternalStore
.This custom task queue prioritizes analysis requests and will ensure that loadouts the user is looking at (which works because of loadouts list virtualization) are analysed first, and everything else is analyzed in the background.