Skip to content

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Jun 3, 2025

This PR affects the new manager, by changing the design of the new manager's cards to be up to date with the latest Figma reference.

However, please note that banner_url and github stars are both missing from this PR. They'll both be added in a future patch, once the backend is updated.

┆Issue is synchronized with this Notion page by Unito

@benceruleanlu benceruleanlu marked this pull request as ready for review June 4, 2025 13:58
@benceruleanlu benceruleanlu requested a review from a team as a code owner June 4, 2025 13:58
Copy link
Contributor

@webfiltered webfiltered left a comment

Choose a reason for hiding this comment

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

First pass: I only know what this PR is about because I read the branch name. Can you please update the description?

Comment on lines +419 to +434
const pack = selectedNodePack.value
if (!pack?.id) return
if (hasMultipleSelections.value) return
const data = await getPackById.call(selectedNodePack.value.id)
if (data?.id === selectedNodePack.value?.id) {
// If selected node hasn't changed since request, merge registry & Algolia data
selectedNodePacks.value = [merge(selectedNodePack.value, data)]
// Only fetch if we haven't already for this pack
if (lastFetchedPackId.value === pack.id) return
const data = await getPackById.call(pack.id)
// If selected node hasn't changed since request, merge registry & Algolia data
if (data?.id === pack.id) {
lastFetchedPackId.value = pack.id
const mergedPack = merge({}, pack, data)
selectedNodePacks.value = [mergedPack]
// Replace pack in displayPacks so that children receive a fresh prop reference
const idx = displayPacks.value.findIndex((p) => p.id === mergedPack.id)
if (idx !== -1) {
displayPacks.value.splice(idx, 1, mergedPack)
}
Copy link
Contributor

@christian-byrne christian-byrne Jun 5, 2025

Choose a reason for hiding this comment

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

Can you verify using Network tab in dev tools that this caching is necessary? The getPackById should already be wrapped with useCachedRequest which handles request caching / deduplication. Although in general this doesn't really hurt to add, so not a big deal.

Copy link
Member Author

Choose a reason for hiding this comment

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

apart from caching, it also prevents an infinite loop issue I had, it should be OK to ship as is, not too important

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

@benceruleanlu benceruleanlu marked this pull request as draft June 5, 2025 05:49
@benceruleanlu benceruleanlu marked this pull request as ready for review June 6, 2025 04:09
Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

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

Nice work!

@christian-byrne christian-byrne merged commit 65289b1 into main Jun 6, 2025
10 checks passed
@christian-byrne christian-byrne deleted the bl-updated-manager-cards branch June 6, 2025 11:19
lordTyrion pushed a commit to playbook3d/ComfyUI_frontend that referenced this pull request Jul 2, 2025
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.

4 participants