-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[UI v2] feat: Loads data and url state to concurrency limit route for UX to consume #16227
[UI v2] feat: Loads data and url state to concurrency limit route for UX to consume #16227
Conversation
d3d5098
to
7131ab2
Compare
4146d73
to
be83e4a
Compare
filter: GlobalConcurrencyLimitsFilter = { offset: 0 }, | ||
) => useSuspenseQuery(buildListGlobalConcurrencyLimitsQuery(filter)); | ||
|
||
useListGlobalConcurrencyLimits.loader = ({ |
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.
ended up using this .loader
style for consistency with Variable
.
But one principal I'm trying to keep in mind is
How do we keep our server data reusable throughout the webapp as it grows and evolve?
I think only exposing queryOptions
and mutations
exposed to the webapp gives this flexibility because you can feed it into different loaders, useQuery
, useQueries
, useSuspenseQuery
, and useSuspenseQueries
for different scenarios.
But let keep building more stuff to see some similar patterns
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.
We could end up with multiple entry points. In most cases, you can use the prebuilt hooks (a la useVariables
), but developers can import and use the query options factory in cases where more customization is needed.
be83e4a
to
d1fdb57
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.
Couldn't get <Link>
to style correctly when wrapping over TabsTrigger
.
Opting to use navigation
for now, even though semantics is a bit off
d1fdb57
to
07c4882
Compare
5476a4a
to
6d4c42a
Compare
7bb94a6
to
35d8240
Compare
35d8240
to
8151ac2
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.
LGTM!
This PR focuses on passing data from react query cache and url state into the route component, which will be consumed by the page component
useSuspenseQuery
wrapper.Screen.Recording.2024-12-05.at.4.24.30.PM.mov
Checklist
<link to issue>
"mint.json
.Related to #15512