-
Notifications
You must be signed in to change notification settings - Fork 659
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
feat/teaming: Added revamped UI of teaming for litmus 3.0.0 #4134
Conversation
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
…tmus into graphql-server Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
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.
Looks good! Great improvement over last time. 🚀
export interface Members { | ||
userID: string; | ||
name: string; | ||
username: string; | ||
email: string; | ||
role: PermissionGroup; | ||
invitation: Invitation; | ||
joinedAt: string; | ||
} | ||
|
||
export interface Project { | ||
projectID: string; | ||
name: string; | ||
members: Members[]; | ||
UID: string; | ||
} |
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.
Are these two interfaced being used anywhere?
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.
it's always good to type them all out @hrishavjha
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.
Types are automatically generated from swagger file, these are ig old ones.
chaoscenter/web/src/controllers/ActiveProjectMemberList/ActiveProjectMembers.tsx
Show resolved
Hide resolved
chaoscenter/web/src/controllers/PendingProjectMemberList/PendingProjectMembers.tsx
Show resolved
Hide resolved
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.
make sure the strings are flattened out and not nested.
//} else { | ||
// logrus.WithFields(logFields).Info() | ||
//} |
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.
commented code
export interface Members { | ||
userID: string; | ||
name: string; | ||
username: string; | ||
email: string; | ||
role: PermissionGroup; | ||
invitation: Invitation; | ||
joinedAt: string; | ||
} | ||
|
||
export interface Project { | ||
projectID: string; | ||
name: string; | ||
members: Members[]; | ||
UID: string; | ||
} |
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.
it's always good to type them all out @hrishavjha
data, | ||
isLoading, | ||
refetch: getMembersRefetch | ||
} = useGetProjectMembersQuery({ project_id: projectID, state: 'accepted' }); |
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.
Invitation.ACCEPTED has a value of 'Accepted' but this requires 'accepted'
Can we make it the same...follow one convention
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.
These are also generated by swagger, typing is not possible.
userID: member.userID, | ||
name: member.name, | ||
username: member.username, | ||
email: member.email, | ||
invitation: member.invitation, | ||
joinedAt: member.joinedAt, | ||
role: member.role |
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.
userID: member.userID, | |
name: member.name, | |
username: member.username, | |
email: member.email, | |
invitation: member.invitation, | |
joinedAt: member.joinedAt, | |
role: member.role | |
...member |
@@ -0,0 +1,20 @@ | |||
import type { ProjectMember } from '@api/auth'; | |||
|
|||
export function generateActiveMemberTableContent(memberData: Array<ProjectMember> | undefined): Array<ProjectMember> { |
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.
I don't understand the utility of this function...it's not doing any modification on memberData
messageTitle: 'No pending invitations present', | ||
message: 'No pending invitations present' |
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.
strings
data-testid="add-members" | ||
icon="plus" | ||
iconProps={{ size: 10 }} | ||
text="New Member" |
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.
string
tabList={[ | ||
{ | ||
id: 'active-members', | ||
title: 'Active Members', |
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.
string
}, | ||
{ | ||
id: 'pending-members', | ||
title: 'Pending Members', |
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.
string
<Layout.Horizontal flex={{ alignItems: 'center', justifyContent: 'space-between' }}> | ||
<Text font={{ variation: FontVariation.H4 }}>Remove Member</Text> | ||
</Layout.Horizontal> | ||
<Text font={{ variation: FontVariation.BODY }}>Are you sure you want to remove {username}?</Text> |
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.
string
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Signed-off-by: Saranya-jena <saranya.jena@harness.io>
…aos#4134) * Added UI screens for active project members Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added auth endpoints to fetch active and pending members Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added api integration for active and pending members Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added api integration for invite users Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Api refactor for invite users Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Integrated table v2 with invite users api Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Adding pending mebers screen Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added pending members table Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added json schema for all the fields Signed-off-by: Saranya-jena <saranya.jena@harness.io> * updated schema in frontend Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added epi integration for teaming Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added refetch functions in the modals and tables Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added ui fixes Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added loader and default text for empty array Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added user details fields while sending invitations Signed-off-by: Saranya-jena <saranya.jena@harness.io> * Added user details fields while project initialization Signed-off-by: Saranya-jena <saranya.jena@harness.io> * removed unused comments Signed-off-by: Saranya-jena <saranya.jena@harness.io> * resolved review comments Signed-off-by: Saranya-jena <saranya.jena@harness.io> * uncommented the logs Signed-off-by: Saranya-jena <saranya.jena@harness.io> --------- Signed-off-by: Saranya-jena <saranya.jena@harness.io>
Proposed changes
Summarize your changes here to communicate with the maintainers and make sure to put the link of that issue
Types of changes
What types of changes does your code introduce to Litmus? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Dependency
Special notes for your reviewer: