Skip to content

Commit

Permalink
[FIX] User Portal: People Page Violates The Figma Style Guide (#3310)
Browse files Browse the repository at this point in the history
* ui fix

* fix

* css fix

* Update src/screens/UserPortal/People/People.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix

* fix

* Update src/style/app.module.css

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add test and ui fix

* fix

* ui fix

* fix

* ui fix

* ui fix

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
hustlernik and coderabbitai[bot] authored Jan 20, 2025
1 parent e843b36 commit a218d86
Show file tree
Hide file tree
Showing 12 changed files with 448 additions and 256 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[Admin Docs](/)

***

# Variable: MOCKS\_EMPTY

> `const` **MOCKS\_EMPTY**: `object`[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:344](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L344)

## Type declaration

### request

> **request**: `object`
#### request.query

> **query**: `DocumentNode` = `ORGANIZATION_USER_TAGS_LIST`
#### request.variables

> **variables**: `object`
#### request.variables.first

> **first**: `number` = `TAGS_QUERY_DATA_CHUNK_SIZE`
#### request.variables.id

> **id**: `string` = `'orgId'`
#### request.variables.sortedBy

> **sortedBy**: `object`
#### request.variables.sortedBy.id

> **id**: `string` = `'DESCENDING'`
#### request.variables.where

> **where**: `object`
#### request.variables.where.name

> **name**: `object`
#### request.variables.where.name.starts\_with

> **starts\_with**: `string` = `''`
### result

> **result**: `object`
#### result.data

> **data**: `object`
#### result.data.organizations

> **organizations**: `object`[]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> `const` **MOCKS\_ERROR**: `object`[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:413](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L413)
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:319](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L319)

## Type declaration

Expand All @@ -32,7 +32,7 @@ Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:413](https://
#### request.variables.id

> **id**: `string` = `'orgId'`
> **id**: `string` = `'orgIdError'`
#### request.variables.sortedBy

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[Admin Docs](/)

***

# Variable: MOCKS\_ERROR\_ERROR\_TAG

> `const` **MOCKS\_ERROR\_ERROR\_TAG**: `object`[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:334](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L334)

## Type declaration

### error

> **error**: `Error`
### request

> **request**: `object`
#### request.query

> **query**: `DocumentNode` = `CREATE_USER_TAG`
#### request.variables

> **variables**: `object`
#### request.variables.name

> **name**: `string` = `'userTagE'`
#### request.variables.organizationId

> **organizationId**: `string` = `'orgId'`
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: MOCKS\_NO\_MORE\_PAGES

> `const` **MOCKS\_NO\_MORE\_PAGES**: (\{ `request`: \{ `query`: `DocumentNode`; `variables`: \{ `after`: `undefined`; `first`: `number`; `id`: `string`; `sortedBy`: \{ `id`: `string`; \}; `where`: \{ `name`: \{ `starts_with`: `string`; \}; \}; \}; \}; `result`: \{ `data`: \{ `organizations`: `object`[]; \}; \}; \} \| \{ `request`: \{ `query`: `DocumentNode`; `variables`: \{ `after`: `string`; `first`: `number`; `id`: `string`; `sortedBy`: \{ `id`: `string`; \}; `where`: \{ `name`: \{ `starts_with`: `string`; \}; \}; \}; \}; `result`: \{ `data`: `any`; \}; \})[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:477](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L477)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Admin Docs](/)

***

# Variable: MOCKS\_NULL\_END\_CURSOR

> `const` **MOCKS\_NULL\_END\_CURSOR**: (\{ `request`: \{ `query`: `DocumentNode`; `variables`: \{ `after`: `undefined`; `first`: `number`; `id`: `string`; `sortedBy`: \{ `id`: `string`; \}; `where`: \{ `name`: \{ `starts_with`: `string`; \}; \}; \}; \}; `result`: \{ `data`: \{ `organizations`: `object`[]; \}; \}; \} \| \{ `request`: \{ `query`: `DocumentNode`; `variables`: \{ `after`: `any`; `first`: `number`; `id`: `string`; `sortedBy`: \{ `id`: `string`; \}; `where`: \{ `name`: \{ `starts_with`: `string`; \}; \}; \}; \}; `result`: \{ `data`: \{ `organizations`: `object`[]; \}; \}; \})[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:391](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L391)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[Admin Docs](/)

***

# Variable: MOCKS\_UNDEFINED\_USER\_TAGS

> `const` **MOCKS\_UNDEFINED\_USER\_TAGS**: `object`[]
Defined in: [src/screens/OrganizationTags/OrganizationTagsMocks.ts:376](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrganizationTags/OrganizationTagsMocks.ts#L376)

## Type declaration

### request

> **request**: `object`
#### request.query

> **query**: `DocumentNode` = `ORGANIZATION_USER_TAGS_LIST`
#### request.variables

> **variables**: `object`
#### request.variables.first

> **first**: `number` = `TAGS_QUERY_DATA_CHUNK_SIZE`
#### request.variables.id

> **id**: `string` = `'orgId'`
#### request.variables.sortedBy

> **sortedBy**: `object`
#### request.variables.sortedBy.id

> **id**: `string` = `'DESCENDING'`
#### request.variables.where

> **where**: `object`
#### request.variables.where.name

> **name**: `object`
#### request.variables.where.name.starts\_with

> **starts\_with**: `string` = `''`
### result

> **result**: `object`
#### result.data

> **data**: `object`
#### result.data.organizations

> **organizations**: `object`[]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **default**(): `JSX.Element`
Defined in: [src/screens/UserPortal/People/People.tsx:39](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/UserPortal/People/People.tsx#L39)
Defined in: [src/screens/UserPortal/People/People.tsx:40](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/UserPortal/People/People.tsx#L40)

`People` component displays a list of people associated with an organization.
It allows users to filter between all members and admins, search for members by their first name,
Expand Down
33 changes: 0 additions & 33 deletions src/components/UserPortal/PeopleCard/PeopleCard.module.css

This file was deleted.

20 changes: 10 additions & 10 deletions src/components/UserPortal/PeopleCard/PeopleCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import aboutImg from 'assets/images/defaultImg.png';
import styles from './PeopleCard.module.css';
import styles from './../../../style/app.module.css';

/**
* Props interface for the PeopleCard component.
Expand Down Expand Up @@ -32,11 +32,11 @@ function peopleCard(props: InterfaceOrganizationCardProps): JSX.Element {
const imageUrl = props.image ? props.image : aboutImg;

return (
<div className={`d-flex flex-row`}>
<div className={styles.people_card_container}>
{/* Container for serial number and image */}
<span style={{ flex: '1' }} className="d-flex">
<span style={{ flex: '1' }} className={styles.display_flex}>
{/* Serial number */}
<span style={{ flex: '1' }} className="align-self-center">
<span style={{ flex: '1' }} className={styles.align_center}>
{props.sno}
</span>
{/* Person's image */}
Expand All @@ -45,22 +45,22 @@ function peopleCard(props: InterfaceOrganizationCardProps): JSX.Element {
src={imageUrl}
width="80px"
height="auto"
className={`${styles.personImage}`}
className={styles.personImage_peoplecard}
/>
</span>
</span>
{/* Person's name */}
<b style={{ flex: '2' }} className="align-self-center">
<b style={{ flex: '2' }} className={styles.align_center}>
{props.name}
</b>
{/* Person's email */}
<span style={{ flex: '2' }} className="align-self-center">
<span style={{ flex: '2' }} className={styles.align_center}>
{props.email}
</span>
{/* Person's role with additional styling */}
<div style={{ flex: '2' }} className="align-self-center">
<div className={`w-75 border py-2 px-3 ${styles.borderBox}`}>
<span className={`${styles.greenText}`}>{props.role}</span>
<div style={{ flex: '2' }} className={styles.align_center}>
<div className={styles.people_role}>
<span>{props.role}</span>
</div>
</div>
</div>
Expand Down
78 changes: 0 additions & 78 deletions src/screens/UserPortal/People/People.module.css

This file was deleted.

Loading

0 comments on commit a218d86

Please sign in to comment.