-
Notifications
You must be signed in to change notification settings - Fork 20
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
✨ Fetch workspace data in batches and add advanced filtering #206
Conversation
…ace-bulk-fetch-repos-records
@@ -106,7 +106,7 @@ export const ModerationLabel = ({ | |||
}) | |||
|
|||
return ( | |||
<Popover className="relative"> | |||
<Popover className="relative z-20"> |
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 known z-index value helps us overlap other content on labels.
}: { | ||
listData: WorkspaceListData | undefined | ||
}) => { | ||
const [filters, setFilters] = useState({ |
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 can be cleaned up a bit bit it's not bad for a very isolated component.
const handleRemoveSelected = () => { | ||
const selectedItems = Array.from( | ||
formRef.current?.querySelectorAll<HTMLInputElement>( | ||
'input[type="checkbox"][name="workspaceItem"]:checked', | ||
) || [], | ||
).map((checkbox) => checkbox.value) | ||
removeItemsMutation.mutate(selectedItems) | ||
removeItemsMutation.mutate(selectedItems as string[]) |
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.
Are the checkbox values always strings, never e.g. undefined
?
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.
yep, these checkboxes always carry the value of the did/uri
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.
Nice 👍
Depends on bluesky-social/atproto#2836
Use the newly available getRepos and getRecords endpoints to bulk fetch data for workspace items. This also allows us to provide additional context to workspace items without expanding into full view mode per item.
This PR also adds a way to filter items from the workspace based on a combination of options among accounts and other content type which allows mods to select/unselect items from workspace in batches.