Conversation
cmp5987
left a comment
There was a problem hiding this comment.
Just a few comments based on what you currently have written.
tavern/internal/www/src/components/page-wrapper/PageWrapper.tsx
Outdated
Show resolved
Hide resolved
tavern/internal/www/src/pages/user-list/components/UserTable.tsx
Outdated
Show resolved
Hide resolved
tavern/internal/www/src/pages/user-list/components/UserTable.tsx
Outdated
Show resolved
Hide resolved
tavern/internal/www/src/pages/user-list/components/UserTable.tsx
Outdated
Show resolved
Hide resolved
tavern/internal/www/src/pages/user-list/components/UserTable.tsx
Outdated
Show resolved
Hide resolved
tavern/internal/www/src/components/page-wrapper/PageWrapper.tsx
Outdated
Show resolved
Hide resolved
| const [sidebarOpen, setSidebarOpen] = useState(false) | ||
| const {data, isLoading, error} = useContext(AuthorizationContext); | ||
|
|
||
| if(isLoading){ |
There was a problem hiding this comment.
I think it would be good to pull this logic outside of PageWrapper so the PageWrapper is only accessed after AuthorizationContext is loaded.
There was a problem hiding this comment.
I kept this here because it needs to be used by AccessGate and Navigation. Is there an easy way to use it in both places without using context twice?
| } | ||
| `; | ||
|
|
||
| const handleError = (error: NetworkError | GraphQLErrors) => { |
There was a problem hiding this comment.
When are these errors displayed, I saw the submit used by the table.
Additionally, How are they reset to false for if a user tries to re-trigger the action on a failure?
There was a problem hiding this comment.
When an error occurs as a result of a user demoting/promoting a user. We should be displaying these errors to the user. This could occur via Toast or other banner message. It should also be dismissible.
| <span>This portal is for managing users allowed to access Tavern. You can also promote users to Administrator, who will be able to access this page.</span> | ||
| </div> | ||
| </div> | ||
| <Tab.Group> |
There was a problem hiding this comment.
Any plans for what this will expand to include, right now we have only 1 tab so its a bit odd to include a tab/tab panel.
There was a problem hiding this comment.
Since we are naming it an "Admin" panel, thought it would be good to add tabs if other admin features need to get added later
|
Solves #838 |
|
Will leave this review to @cmp5987 as well |
|
Nits:
Task Output vs Task Finished |
Is there an example in the codebase I can use? |
For an Inline banner example we have 'AlertError' component that was used in our Tome repo setup. This is a simple guide on using Chakra-UI Toasts for user feedback. |
cmp5987
left a comment
There was a problem hiding this comment.
Awesome work,
Don't forget to squash, rebase and rebuild the UI.
~ I think we can squeeze this in for next weeks release.













What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds a User Management page. Instead of needing to use the GraphQL Playground, you can approve/promote users in the website.
Which issue(s) this PR fixes:
N/A