Skip to content

Commit

Permalink
Fix:
Browse files Browse the repository at this point in the history
Addressed the issue of UI redundancy as discussed in Issue #1380.

What:
- Removed the 'Cancel' button, and added the 'Manage Features' header for the Modal leaving the 'X' icon as the sole close option.

Impact:
- Simplifies the modal interface, enhancing the overall user experience and reducing potential confusion.

Tests:
- Tested the individual file by running this command: `npm run test --watchAll=false /path/to/test/file`
- Tested code coverage for this file with : `npm run test -- --collectCoverageFrom="src/screens/OrgList/*" /src/screens/OrgList/OrgList.test.tsx`
  • Loading branch information
harshpreet14 committed Jan 6, 2024
1 parent 6ba8db0 commit 974504f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
3 changes: 3 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/screens/OrgList/OrgList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ describe('Organisations Page testing as SuperAdmin', () => {
screen.queryByText(/Congratulation the Organization is created/i)
).toBeInTheDocument()
);
userEvent.click(screen.getByTestId(/closeOrganizationModal/i));
});

test('Plugin Notification model should work properly', async () => {
Expand Down
31 changes: 9 additions & 22 deletions src/screens/OrgList/OrgList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -629,31 +629,18 @@ function orgList(): JSX.Element {
</Modal>{' '}
{/* Plugin Notification Modal after Org is Created */}
<Modal show={dialogModalisOpen} onHide={toggleDialogModal}>
<Modal.Header
className="bg-primary"
closeButton
data-testid="modalOrganizationHeader"
>
<Modal.Title className="text-white">
{t('manageFeatures')}
</Modal.Title>
</Modal.Header>
<Modal.Body>
<section id={styles.grid_wrapper}>
<div>
<div className={styles.flexdir}>
<p className={styles.titlemodal}>{t('manageFeatures')}</p>
<a
onClick={toggleDialogModal}
className={styles.cancel}
data-testid="closeOrganizationModal"
>
<i
className="fa fa-times"
style={{
cursor: 'pointer',
}}
></i>
</a>
<Button
variant="secondary"
onClick={toggleModal}
data-testid="cancelOrganizationModal"
>
{t('cancel')}
</Button>
</div>
<h4 className={styles.titlemodaldialog}>
{t('manageFeaturesInfo')}
</h4>
Expand Down

0 comments on commit 974504f

Please sign in to comment.