Skip to content
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

Merged
merged 23 commits into from
Aug 21, 2023

Conversation

Saranya-jena
Copy link
Contributor

Proposed changes

image image image

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 apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

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.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

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>
Copy link
Member

@SahilKr24 SahilKr24 left a 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. 🚀

Comment on lines 9 to 24
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;
}
Copy link
Member

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?

Copy link
Contributor

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

Copy link
Member

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.

Copy link
Contributor

@arkajyotiMukherjee arkajyotiMukherjee left a 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.

Comment on lines 60 to 62
//} else {
// logrus.WithFields(logFields).Info()
//}
Copy link
Contributor

Choose a reason for hiding this comment

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

commented code

Comment on lines 9 to 24
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;
}
Copy link
Contributor

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' });
Copy link
Contributor

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

Copy link
Contributor Author

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.

Comment on lines 8 to 14
userID: member.userID,
name: member.name,
username: member.username,
email: member.email,
invitation: member.invitation,
joinedAt: member.joinedAt,
role: member.role
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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> {
Copy link
Contributor

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

Comment on lines 143 to 144
messageTitle: 'No pending invitations present',
message: 'No pending invitations present'
Copy link
Contributor

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"
Copy link
Contributor

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',
Copy link
Contributor

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',
Copy link
Contributor

Choose a reason for hiding this comment

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

string

Comment on lines 27 to 30
<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>
Copy link
Contributor

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>
@Saranya-jena Saranya-jena merged commit 4b778f5 into litmuschaos:master Aug 21, 2023
13 of 14 checks passed
punithnayak pushed a commit to punithnayak/litmus that referenced this pull request Aug 23, 2023
…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>
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.

None yet

4 participants