Skip to content

Public Queries #119

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

Open
wants to merge 131 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
91749c3
refactor(recent-feedback): stabilize relative timestamps
hobbescodes Apr 29, 2025
474663d
refactor(page): make description optional, update copy
hobbescodes Apr 29, 2025
d1ca0a4
chore(copy): update org page copy
coopbri Apr 29, 2025
a0efad7
chore(profile): remove close account CTA
coopbri Apr 29, 2025
914b955
chore(profile): Edit -> Manage
coopbri Apr 29, 2025
1098292
fix: fix email addresses (WIP)
coopbri Apr 29, 2025
30fc676
chore(env): extract from/to email addresses to env vars
coopbri Apr 29, 2025
2f9be6f
chore: remove unused imports
coopbri Apr 29, 2025
6dfbc88
chore: rename 'identityUrl' -> 'identityProviderUrl'
coopbri Apr 29, 2025
5db3003
refactor(app-config): nest organization-related strings into `organiz…
coopbri Apr 29, 2025
98143c9
chore(app-config): add JSDoc
coopbri Apr 29, 2025
1214996
feature(recent-feedback): add project name
coopbri Apr 29, 2025
55ebf08
feature(recent-feedback): add link, change feedback description to title
coopbri Apr 29, 2025
b14508d
chore(app-config): normalize copy (remove punctuation)
coopbri Apr 29, 2025
c7c99d7
style(recent-feedback): add information to card
coopbri Apr 29, 2025
0b38884
fix(recent-feedback): use custom link component
coopbri Apr 29, 2025
e31976f
docs(link): update props docs
coopbri Apr 29, 2025
fbd6233
style(recent-feedback): set last item bottom padding
coopbri Apr 29, 2025
ed5f541
refactor(feedback-section): Flex -> Stack
coopbri Apr 29, 2025
fca46a0
style(recent-feedback): set last item bottom margin
coopbri Apr 29, 2025
985f867
chore(comments): remove min length
coopbri Apr 29, 2025
0a2186b
refactor(recent-feedback): update responsive design
hobbescodes Apr 29, 2025
825b92d
refactor(dashboard): include today's feedback in feedback overview
hobbescodes Apr 29, 2025
ad0e24f
refactor: remove UTC conversions
hobbescodes Apr 29, 2025
aa73d82
Revert "refactor: remove UTC conversions"
hobbescodes Apr 29, 2025
e0f4c4b
chore: remove duration plugin
hobbescodes Apr 29, 2025
ea8a7fd
fix: update manage profile href for both dev and prod environments
Twonarly1 Apr 29, 2025
a4af542
refactor: move view all organizations outside of pinned orgs scope
hobbescodes Apr 29, 2025
62e5a1f
Refresh Token Rotation (#118)
hobbescodes Apr 29, 2025
0e99cc7
fix(copy): set singular if value is 1, plural otherwise, update casin…
coopbri Apr 30, 2025
27d7fef
chore: reorder actions (settings on bottom)
coopbri Apr 30, 2025
0cd395d
fix(dashboard-metric): display type from small breakpoint +
coopbri Apr 30, 2025
65d9165
fix(project-card): display type from small breakpoint +
coopbri Apr 30, 2025
08b86f1
style(organization-list): display metric type
coopbri Apr 30, 2025
f97669a
style(project-list): display metric type
coopbri Apr 30, 2025
22f9ea0
refactor: create and extract 'setSingularOrPlural' util
coopbri Apr 30, 2025
2dc835b
style: wrap containers with singular/plural metrics
coopbri Apr 30, 2025
ca49017
fix(dashboard): fix 'View All Organizations' CTA not working
coopbri Apr 30, 2025
d444dc0
feat: add an optional tooltip to the emty state button if the action …
Twonarly1 Apr 30, 2025
cc17e80
refactor(pinned-organizations): update responsive design of org cards
hobbescodes Apr 30, 2025
a9f65e9
chore(app-config): remove support email display name property
coopbri Apr 30, 2025
bc57d4e
fix(project-card): update rendering for metrics
hobbescodes Apr 30, 2025
a84fdad
chore: handle all empty states with disabled states and tooltips if r…
Twonarly1 Apr 30, 2025
dd27f86
chore: uncomment code for development tier mocking
Twonarly1 Apr 30, 2025
669e0dc
refactor(pricing): update copy, add reference to discount code
hobbescodes Apr 30, 2025
1e7766d
refactor(sidebar-navigation): add pricing route if subscription is no…
hobbescodes Apr 30, 2025
e43f196
chore: reorganize imports
hobbescodes Apr 30, 2025
39ef689
refactor: add mask image to scrollable containers when scrollbar is h…
hobbescodes Apr 30, 2025
38ce4d0
refactor: remove auth restriction from most pages
hobbescodes May 1, 2025
a2c15a5
refactor: disable or conditionally render actions depending on sessio…
hobbescodes May 1, 2025
2fda3b2
chore: clean up files, remove commented code
hobbescodes May 1, 2025
a545de3
refactor: reduce auth requests for subscription queries
hobbescodes May 1, 2025
28bf555
chore: remove commented out code
hobbescodes May 1, 2025
5a8e2ee
chore: remove commented out code
hobbescodes May 1, 2025
ef411a5
chore: add documents Link to header and footer
benjamin-parks May 1, 2025
6cf13f9
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
74ceed6
feature(hero): add hero image
coopbri May 1, 2025
212d6a6
chore: format
coopbri May 1, 2025
0cc2382
chore: adjust Docs in header and remove it from mobile viewports keep…
benjamin-parks May 1, 2025
df6d04a
refactor(hero): fix CLS with explicit image sizing
hobbescodes May 1, 2025
d5eb292
chore: use Image from core components
hobbescodes May 1, 2025
9faa1ec
test: mock next image
hobbescodes May 1, 2025
3f6c0ea
fix: update file names
hobbescodes May 1, 2025
e948e9d
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
fd23a5e
refactor(footer): adjust sizing and spacing
hobbescodes May 1, 2025
2753ddf
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
a35f1c2
feature: add tooltips to all CTA while being tier specific
Twonarly1 May 1, 2025
4033a26
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
65ac927
chore: format
hobbescodes May 1, 2025
73275eb
refactor(header): stabilize spacing and size for nav items, update ex…
hobbescodes May 1, 2025
2077c7c
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
10bc176
style: sticky headers with a backdrop filter
Twonarly1 May 1, 2025
4ee3e49
refactor(recent-feedback): allow users to load more posts
hobbescodes May 1, 2025
38be460
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 1, 2025
43d7b14
fix(forms): add explicit tabIndex to SubmitForm for Safari support
hobbescodes May 1, 2025
9418a68
refactor: swap character limits for comments and feedback, adjust com…
hobbescodes May 1, 2025
7e4f005
feature(project-feedback): add filter options
hobbescodes May 2, 2025
011fc98
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 2, 2025
16ded2b
fix(feedback-card): invalidate posts query when status changes
hobbescodes May 2, 2025
3b51026
fix(feedback-card): invalidate status breakdown when status changes
hobbescodes May 2, 2025
27ff07a
feature(project-feedback): add functionality to search for feedback b…
hobbescodes May 2, 2025
4b8e45b
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 2, 2025
e83a18b
refactor: adjust padding for overflow containers
hobbescodes May 2, 2025
02b10d4
refactor(hero): replace hardcoded value with breakpoint design token
coopbri May 2, 2025
395be36
chore: remove production block
coopbri May 2, 2025
c5751f2
refactor: replace all hardcoded breakpoint values for useViewportSize
hobbescodes May 2, 2025
140133f
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 2, 2025
ac1ae13
chore: reorg imports
hobbescodes May 2, 2025
a8da771
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 2, 2025
907dcc6
refactor(landing-page): replace hero image with megaphone icon
hobbescodes May 2, 2025
de11fee
fix(footer): use docs URL variable
coopbri May 2, 2025
4254af3
chore(util): convert `setSingularOrPlural` to inline return
coopbri May 2, 2025
3ff2c67
docs: update JSDoc
hobbescodes May 2, 2025
9ab47c0
chore: update static text for footer
Twonarly1 May 2, 2025
73683fc
feature(footer): add social media icons
coopbri May 2, 2025
b8ec296
refactor(profile): update pattern for accessing user information
hobbescodes May 2, 2025
d9203e8
chore: reorg imports
hobbescodes May 2, 2025
13f40ac
refactor(layout): remove conditional rendering of layout
hobbescodes May 2, 2025
e139044
Merge branch 'feature/prerelease' into feature/public-queries
hobbescodes May 2, 2025
cd8b1ff
Merge branch 'master' into feature/public-queries
hobbescodes May 2, 2025
173c042
Merge branch 'master' into feature/public-queries
hobbescodes May 2, 2025
bfa4c38
Merge branch 'master' into feature/public-queries
hobbescodes May 5, 2025
5fe2786
Merge branch 'master' into feature/public-queries
hobbescodes May 5, 2025
51fe7f8
Merge branch 'master' into feature/public-queries
hobbescodes May 5, 2025
86c2d63
Merge branch 'master' into feature/public-queries
hobbescodes May 7, 2025
fc76f1e
refactor(feedback): adjust types for component props
hobbescodes May 7, 2025
7cdb2bf
refactor: disable voting buttons if user is not signed in
hobbescodes May 7, 2025
62ee398
refactor(dashboard): adjust styles to prevent box shadow clipping
hobbescodes May 7, 2025
369d00d
refactor(header): add organizations link, update sidebar to enable na…
hobbescodes May 7, 2025
196203f
refactor: add prefetched queries based on session conditionally
hobbescodes May 7, 2025
8690791
refactor(middleware): redirect user if trying to access confirmation …
hobbescodes May 7, 2025
a8af0be
refactor(graphql): remove instances of create user mutation
hobbescodes May 7, 2025
a12da41
fix(recent-feedback): adjust container width
hobbescodes May 7, 2025
10d7695
Merge branch 'master' into feature/public-queries
hobbescodes May 8, 2025
92f75cd
Merge branch 'master' into feature/public-queries
hobbescodes May 8, 2025
51fc22d
Merge branch 'master' into feature/public-queries
hobbescodes May 9, 2025
e6b9a7f
Merge branch 'master' into feature/public-queries
hobbescodes May 12, 2025
2a0925f
Merge branch 'master' into feature/public-queries
hobbescodes May 13, 2025
993f3f9
Merge branch 'master' into feature/public-queries
hobbescodes May 14, 2025
d60f7f3
Merge branch 'master' into feature/public-queries
hobbescodes May 15, 2025
318135d
refactor: make adjustments to disabled states and user access
hobbescodes May 15, 2025
f3d1c2e
refactor(organization): disable view all projects CTA if there are no…
hobbescodes May 15, 2025
8f12171
refactor(util): allow queries to refetch on window focus
hobbescodes May 15, 2025
ff93c0c
chore(org-management): update import sorting
hobbescodes May 15, 2025
6e84823
chore(org-management): update import sorting
hobbescodes May 15, 2025
24aabf0
refactor(voting-buttons): update opacity and tooltips when a user is …
hobbescodes May 15, 2025
28e59e0
Merge branch 'master' into feature/public-queries
hobbescodes May 15, 2025
371693c
Use `queryOptions` API (#140)
hobbescodes May 15, 2025
cb4b361
Merge branch 'master' into feature/public-queries
hobbescodes May 16, 2025
50be431
Merge branch 'master' into feature/public-queries
hobbescodes May 22, 2025
0dc8ae1
Merge branch 'master' into feature/public-queries
hobbescodes May 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions src/__mocks__/handlers/user/createUser.mock.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/__mocks__/handlers/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./createUser.mock";
export * from "./user.mock";
28 changes: 15 additions & 13 deletions src/app/organizations/[organizationSlug]/(manage)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const ManageOrganizationLayout = async ({ params, children }: Props) => {

const session = await auth();

if (!session) notFound();

const organization = await getOrganization({ organizationSlug });

if (!organization) notFound();
Expand All @@ -38,22 +36,26 @@ const ManageOrganizationLayout = async ({ params, children }: Props) => {
queryKey: useOrganizationQuery.getKey({ slug: organizationSlug }),
queryFn: useOrganizationQuery.fetcher({ slug: organizationSlug }),
}),
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
userId: session.user.rowId!,
organizationId: organization.rowId,
}),
queryFn: useOrganizationRoleQuery.fetcher({
userId: session.user.rowId!,
organizationId: organization.rowId,
}),
}),
...(session
? [
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
userId: session.user.rowId!,
organizationId: organization.rowId,
}),
queryFn: useOrganizationRoleQuery.fetcher({
userId: session.user.rowId!,
organizationId: organization.rowId,
}),
}),
]
: []),
]);

return (
<HydrationBoundary state={dehydrate(queryClient)}>
<HStack h="full" w="full" gap={0}>
<ManagementSidebar user={session.user}>{children}</ManagementSidebar>
<ManagementSidebar user={session?.user}>{children}</ManagementSidebar>
</HStack>
</HydrationBoundary>
);
Expand Down
40 changes: 24 additions & 16 deletions src/app/organizations/[organizationSlug]/(manage)/members/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { getSdk } from "lib/graphql";
import { getQueryClient, getSearchParams } from "lib/util";
import { DialogType } from "store";

import type { Member } from "generated/graphql";
import type { SearchParams } from "nuqs/server";

export const generateMetadata = async ({ params }: Props) => {
Expand Down Expand Up @@ -50,8 +51,6 @@ const OrganizationMembersPage = async ({ params, searchParams }: Props) => {

const session = await auth();

if (!session) notFound();

const organization = await getOrganization({
organizationSlug,
});
Expand All @@ -60,12 +59,17 @@ const OrganizationMembersPage = async ({ params, searchParams }: Props) => {

const sdk = getSdk({ session });

const { memberByUserIdAndOrganizationId: member } =
await sdk.OrganizationRole({
userId: session.user.rowId!,
let member: Partial<Member> | null = null;

if (session) {
const { memberByUserIdAndOrganizationId } = await sdk.OrganizationRole({
userId: session?.user.rowId!,
organizationId: organization.rowId,
});

member = memberByUserIdAndOrganizationId ?? null;
}

const queryClient = getQueryClient();

const { search, roles } = await getSearchParams.parse(searchParams);
Expand Down Expand Up @@ -95,16 +99,20 @@ const OrganizationMembersPage = async ({ params, searchParams }: Props) => {
excludeRoles: [Role.Owner],
}),
}),
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
queryFn: useOrganizationRoleQuery.fetcher({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
}),
...(session
? [
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
queryFn: useOrganizationRoleQuery.fetcher({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
}),
]
: []),
]);

return (
Expand Down Expand Up @@ -132,7 +140,7 @@ const OrganizationMembersPage = async ({ params, searchParams }: Props) => {

<MembershipFilters />

<Members user={session.user} organizationId={organization.rowId} />
<Members user={session?.user} organizationId={organization.rowId} />

{/* dialogs */}
{/* TODO: allow adding owners when transferring ownership is resolved. Restricting to single ownership for now. */}
Expand Down
27 changes: 13 additions & 14 deletions src/app/organizations/[organizationSlug]/(manage)/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ interface Props {
const OrganizationSettingsPage = async ({ params }: Props) => {
const { organizationSlug } = await params;

const session = await auth();

if (!session) notFound();

const organization = await getOrganization({ organizationSlug });
const [session, organization] = await Promise.all([
auth(),
getOrganization({ organizationSlug }),
]);

if (!organization) notFound();
if (!session || !organization) notFound();

const sdk = getSdk({ session });

Expand All @@ -58,23 +57,23 @@ const OrganizationSettingsPage = async ({ params }: Props) => {

await Promise.all([
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
userId: session.user.rowId!,
queryKey: useMembersQuery.getKey({
organizationId: organization.rowId,
roles: [Role.Owner],
}),
queryFn: useOrganizationRoleQuery.fetcher({
userId: session.user.rowId!,
queryFn: useMembersQuery.fetcher({
organizationId: organization.rowId,
roles: [Role.Owner],
}),
}),
queryClient.prefetchQuery({
queryKey: useMembersQuery.getKey({
queryKey: useOrganizationRoleQuery.getKey({
userId: session.user.rowId!,
organizationId: organization.rowId,
roles: [Role.Owner],
}),
queryFn: useMembersQuery.fetcher({
queryFn: useOrganizationRoleQuery.fetcher({
userId: session.user.rowId!,
organizationId: organization.rowId,
roles: [Role.Owner],
}),
}),
]);
Expand Down
40 changes: 24 additions & 16 deletions src/app/organizations/[organizationSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { getQueryClient } from "lib/util";
import { DialogType } from "store";

import type { BreadcrumbRecord } from "components/core";
import type { Member } from "generated/graphql";

export const generateMetadata = async ({ params }: Props) => {
const { organizationSlug } = await params;
Expand All @@ -52,8 +53,6 @@ const OrganizationPage = async ({ params }: Props) => {

const session = await auth();

if (!session) notFound();

const [
organization,
{ isOwnerSubscribed, hasBasicTierPrivileges, hasTeamTierPrivileges },
Expand All @@ -66,12 +65,17 @@ const OrganizationPage = async ({ params }: Props) => {

const sdk = getSdk({ session });

const { memberByUserIdAndOrganizationId: member } =
await sdk.OrganizationRole({
userId: session.user.rowId!,
let member: Partial<Member> | null = null;

if (session) {
const { memberByUserIdAndOrganizationId } = await sdk.OrganizationRole({
userId: session?.user.rowId!,
organizationId: organization.rowId,
});

member = memberByUserIdAndOrganizationId ?? null;
}

const hasAdminPrivileges =
member?.role === Role.Admin || member?.role === Role.Owner;

Expand Down Expand Up @@ -109,16 +113,20 @@ const OrganizationPage = async ({ params }: Props) => {
organizationId: organization.rowId,
}),
}),
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
queryFn: useOrganizationRoleQuery.fetcher({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
}),
...(session
? [
queryClient.prefetchQuery({
queryKey: useOrganizationRoleQuery.getKey({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
queryFn: useOrganizationRoleQuery.fetcher({
organizationId: organization.rowId,
userId: session.user.rowId!,
}),
}),
]
: []),
]);

return (
Expand Down Expand Up @@ -162,7 +170,7 @@ const OrganizationPage = async ({ params }: Props) => {
<OrganizationMetrics organizationId={organization.rowId} />

<OrganizationManagement
user={session.user}
user={session?.user}
organizationId={organization.rowId}
hasAdminPrivileges={hasAdminPrivileges}
/>
Expand Down
Loading