Skip to content

Conversation

david-crespo
Copy link
Collaborator

Proof of concept.

@vercel
Copy link

vercel bot commented Oct 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview Oct 20, 2022 at 5:41PM (UTC)

<Button size="sm" disabled>
New Organization
</Button>
)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Clearly this is too noisy — we'd want to wrap this up into a disable-able custom link component with a disabled prop and a message to show in a tooltip when disabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Disabled links are a bit of an odd pattern. We'd want to change the pointer and ensure we had aria-disabled present. I think it's definitely something we'd want to try out on a screen reader just to see what it resulted in.

await Promise.all([
apiQueryClient.prefetchQuery('organizationList', { query: { limit: 10 } }),
apiQueryClient.prefetchQuery('policyView', {}),
])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

prefetch silo policy

Copy link
Contributor

Choose a reason for hiding this comment

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

Worth a comment?

return me && myGroups && siloPolicy
? userRoleFromPolicies(me, myGroups.items, [siloPolicy])
: null
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all of these requests are prefetched and therefore never undefined, but we don't know it statically

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.

2 participants