-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(web): Face merging utility #15306
base: main
Are you sure you want to change the base?
Conversation
Can you include some screenshots? |
7dd4cbf
to
963b89b
Compare
963b89b
to
d9c2f55
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.
Left a couple suggestions
onMount(async () => { | ||
const { people: similarPeople } = await getAllPeople({ | ||
withHidden: false, | ||
closestPersonId: data.person.id, | ||
}); | ||
// Filter out the person we searched for since we don't want to merge with themselves | ||
const selfIndex = similarPeople.findIndex((person) => person.id === data.person.id); | ||
if (selfIndex !== -1) { | ||
similarPeople.splice(selfIndex, 1); | ||
} | ||
people = similarPeople; | ||
}); |
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 think you probably want to fetch this in merge-faces/[personId]/+page.ts
, and you'll have it in the data
prop. That's the recommended/ideomatic way of fetching data for a page in sveltekit, and you won't need the onMount.
</Button> | ||
</div> | ||
{/snippet} | ||
<div class="flex flex-col gap-4"> |
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 think this div doesn't accomplish anything, it looks like a flex container but it only has one child
Heya, I had a lot of people with some pictures that had faces not quite identifiable enough to match automatically.
This adds a utility to choose a person and see all the identities most similar to them, then select any to merge into the main identity.
It was very useful to me, let me know if anything can be done so it'd be useful for others!