feat: add UI for project storage in project page - #4258
Conversation
|
You can access the deployment of this PR at https://renku-ci-ui-4258.dev.renku.ch |
lorenzo-cavazzi
left a comment
There was a problem hiding this comment.
The logic is already great! I added a few inline comments, but it's mostly minor things; you are already on the right track 👍
P.S. This comment didn't fit inline: you probably want to update DataConnectorModalHeader as well, to change the fixed string data connector in the title into something like project storage when it makes sense.
| getProjectsByProjectIdStorage: { | ||
| providesTags: ["ProjectStorage"], | ||
| }, | ||
| postDataConnectorsStorage: { | ||
| invalidatesTags: ["ProjectStorage"], | ||
| }, | ||
| deleteDataConnectorsStorageByStorageId: { | ||
| invalidatesTags: ["ProjectStorage"], | ||
| }, | ||
| patchDataConnectorsStorageByStorageId: { | ||
| invalidatesTags: ["ProjectStorage"], | ||
| }, |
There was a problem hiding this comment.
That's the way to go 👍
Tip: you could even make the cache smarter by considering the IDs. As of now, any operation invalidates all storages, while E.G. patching a storage could invalidate only that storage's cache. I think for this case we can keep this code without overcomplicating
| if (projectStorageError) { | ||
| return ( | ||
| <RtkOrDataServicesError error={projectStorageError} dismissible={false} /> | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
Change: I understand why you put this here, but I'm not sure it's the best place. If this fails, users won't see any other data connector, which is probably not what we want. I suggest putting this in a child component
Add UI for adding / editing & deleting project storage in Project page
/deploy #notest renku-data-services=feature/project-storage