Skip to content

feat: orgs - user management v2#10160

Merged
zomars merged 48 commits intomainfrom
feat/user-mangament-v2
Jul 19, 2023
Merged

feat: orgs - user management v2#10160
zomars merged 48 commits intomainfrom
feat/user-mangament-v2

Conversation

@sean-brydon
Copy link
Copy Markdown
Member

@sean-brydon sean-brydon commented Jul 14, 2023

figma: https://www.figma.com/file/ZJNAFHCAq6rnuGRgUFxjzQ/Organizations----New-features?type=design&node-id=4304-330348&mode=design&t=nKonHZpucwxnqwQI-4 (Not all features are in this PR)
loom: https://www.loom.com/share/30e8ef20a5b34a708dca160d8c04ae6f

shoutout @shadcn for the base of this table <3

Member View:
CleanShot 2023-07-14 at 14 09 02

Admin view:
CleanShot 2023-07-14 at 14 09 07

How to test

  • Create ORG
  • add members
  • view settings -> orgs -> members

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Looking good @sean-brydon Will make some nits before approving 🙏

Comment on lines +16 to +18
await utils.viewer.teams.get.invalidate();
await utils.viewer.eventTypes.invalidate();
await utils.viewer.organizations.listMembers.invalidate();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can Promise.All instead of cascading here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can even skip the await altogether. Shouldn't be blocking.

Comment on lines +15 to +20
async onSuccess() {
await utils.viewer.teams.get.invalidate();
await utils.viewer.eventTypes.invalidate();
await utils.viewer.organizations.listMembers.invalidate();
showToast(t("success"), "success");
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
async onSuccess() {
await utils.viewer.teams.get.invalidate();
await utils.viewer.eventTypes.invalidate();
await utils.viewer.organizations.listMembers.invalidate();
showToast(t("success"), "success");
},
onSuccess() {
// We don't need to wait for invalidate to finish
Promise.all([
utils.viewer.teams.get.invalidate(),
utils.viewer.eventTypes.invalidate(),
utils.viewer.organizations.listMembers.invalidate(),
]);
showToast(t("success"), "success");
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got this visual nitpick while testing

image

organizationId: input.orgId,
},
}),
prisma.verificationToken.deleteMany({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why?

Comment on lines +85 to +92
const rowVirtualizer = useVirtual({
parentRef: tableContainerRef,
size: rows.length,
overscan: 10,
});
const { virtualItems: virtualRows, totalSize } = rowVirtualizer;
const paddingTop = virtualRows.length > 0 ? virtualRows?.[0]?.start || 0 : 0;
const paddingBottom =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a code comment

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

cool

@zomars
Copy link
Copy Markdown
Contributor

zomars commented Jul 19, 2023

@zomars merged this pull request with Graphite.

@zomars zomars deleted the feat/user-mangament-v2 branch July 19, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only High priority Created by Linear-GitHub Sync organizations area: organizations, orgs ui area: UI, frontend, button, form, input

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants