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

Fixed: Added a button to close model. #1312

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

ZendeAditya
Copy link

@ZendeAditya ZendeAditya commented Jan 11, 2025

Date: 13/01/2025

Developer Name: Aditya Zende (aditya-zende-1)


Issue Ticket Number

Description

In the reusable main Model component, I added a close button with an onclick event handler and code to close the model with an esc button.

loom-video.6.mp4

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Added icon only instead of button

Test Coverage

Screenshot 1

Additional Notes

Copy link

vercel bot commented Jan 11, 2025

@ZendeAditya is attempting to deploy a commit to the RDS-Team Team on Vercel.

A member of the Team first needs to authorize it.

@shobhan-sundar-goutam
Copy link

  1. Why package.json is committed?

  2. This part is not correct. Please check in other PRs on how to do it correctly.
    image

  3. Do you already have any design for the close button? If not, I would suggest you to check other modals of RDS for the close button design.

Copy link
Contributor

@AnujChhikara AnujChhikara left a comment

Choose a reason for hiding this comment

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

Build is failing, likely due to the Node.js version upgrade. Please check

@tejaskh3
Copy link
Member

The build is failing, please fix that.

@tejaskh3
Copy link
Member

Date: 11/01/2025

Developer Name: Aditya Zende (aditya-zende-1)

Issue Ticket Number

#1313

Description

In the reusable main Model component, I added a close button with an onclick event handler and a code to close the model with an esc button.

loom-video.4.mp4

Documentation Updated?

  • Yes
  • [ ✅] No

Under Feature Flag

  • Yes
  • [ ✅] No

Database Changes

  • Yes
  • [ ✅] No

Breaking Changes

  • Yes
  • [ ✅] No

Development Tested?

  • Yes
  • [ ✅] No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1

Additional Notes

Why is development tested no here?

package.json Outdated
Comment on lines 1 to 12
},
"repository": {
"type": "git",
"url": "https://github.com/Real-Dev-Squad/website-status.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@reduxjs/toolkit": "^1.9.1",
"@testing-library/user-event": "^14.5.2",
"axios": "^1.2.2",
"framer-motion": "^11.0.6",
"markdown-to-jsx": "^7.2.0",
"moment": "^2.29.4",
"next": "^13.1.1",
"next-redux-wrapper": "^8.1.0",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-calendar": "^4.8.0",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"react-redux": "^8.0.5",
"react-toastify": "^9.0.8",
"sass": "^1.45.2",
"sass-loader": "^13.0.2"
},
"devDependencies": {
"@babel/core": "^7.16.7",
"@storybook/addon-actions": "^6.4.9",
"@storybook/addon-essentials": "^6.4.9",
"@storybook/addon-links": "^6.4.9",
"@storybook/builder-webpack5": "^6.4.9",
"@storybook/manager-webpack5": "^6.4.9",
"@storybook/preset-scss": "^1.0.3",
"@storybook/react": "^6.4.9",
"@testing-library/dom": "^9.0.1",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^13.3.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/jest": "^29.2.5",
"@types/next": "^9.0.0",
"@types/node": "^18.7.8",
"@types/react": "^18.0.17",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"babel-jest": "^29.3.1",
"babel-loader": "^9.1.2",
"css-loader": "^6.5.1",
"eslint": "^8.6.0",
"eslint-config-next": "^13.1.1",
"eslint-plugin-react": "^7.32.2",
"husky": "8.0.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-mock-axios": "^4.5.0",
"lint-staged": "^13.1.0",
"local-ssl-proxy": "^1.3.0",
"msw": "^0.49.2",
"npm-run-all": "^4.1.5",
"pinst": "^3.0.0",
"react-hooks-testing-library": "^0.6.0",
"react-test-renderer": "^18.2.0",
"style-loader": "^3.3.1",
"ts-jest": "^29.0.3",
"ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typescript": "^4.5.4",
"webpack": "^5.76.0",
"whatwg-fetch": "^3.6.2"
},
"engines": {
"node": "18.x"
},
"lint-staged": {
"*.+(ts|tsx)": [
"eslint ."
]
},
"msw": {
"workerDirectory": "public"
},
"volta": {
"node": "18.14.2",
"yarn": "1.22.19"
}
"name": "status",
"version": "1.0.0",
"description": "Shows a status of the ongoing projects being done",
"main": "index.js",
"scripts": {
"run-command:dev-server": "next dev -p 3000",
"run-command:reverse-ssl": "local-ssl-proxy --source 443 --target 3000",
"dev": "run-p run-command:*",
"build:staging": "cp .env.development .env.local && next build",
"build": "next build",
"start": "next start -p $PORT",
Copy link
Member

Choose a reason for hiding this comment

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

Why is this changed?

please do run prettier and lint fix commands

Comment on lines 38 to 44
<button
className={styles.closeButton}
onClick={props.toggle}
>
close
</button>
{props.children}
Copy link
Member

Choose a reason for hiding this comment

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

can we have a cross icon instead a close button?

If not could you please verify if we are performing close action using the same way at all other modals?

Copy link
Author

Choose a reason for hiding this comment

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

Yes because I added this code in the reusable Model component.

padding: 4px 25px;
border-radius: 3px;
&:hover {
background: #041187;
Copy link
Member

Choose a reason for hiding this comment

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

If possible please try to use global css variables

Copy link
Author

Choose a reason for hiding this comment

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

okay!

@ZendeAditya
Copy link
Author

Hey @tejaskh3 @AnujChhikara Please check it now i fix the node version back to 18

@AnujChhikara
Copy link
Contributor

Hey @tejaskh3 @AnujChhikara Please check it now i fix the node version back to 18

where? can you please check if you have pushed latest changes.

@ZendeAditya
Copy link
Author

Hey @tejaskh3 @AnujChhikara Please check it now i fix the node version back to 18

where? can you please check if you have pushed latest changes.

image
I restored it back

@tejaskh3
Copy link
Member

as the implementation is changed, can you please update the video or screenshot?

@ZendeAditya
Copy link
Author

as the implementation is changed, can you please update the video or screenshot?

Yes I will update it

@ZendeAditya
Copy link
Author

ZendeAditya commented Jan 13, 2025

@tejaskh3 updated image and video with a new one

Copy link
Member

@pankajjs pankajjs left a comment

Choose a reason for hiding this comment

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

Left comments

Comment on lines 38 to 43
<button
className={styles.closeButton}
onClick={props.toggle}
>
<RxCross2 size={20} />
</button>
Copy link
Member

Choose a reason for hiding this comment

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

Why this fix is not behind feature flag?

Copy link
Author

Choose a reason for hiding this comment

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

I will update it as a feature flag

className={styles.closeButton}
onClick={props.toggle}
>
<RxCross2 size={20} />
Copy link
Member

Choose a reason for hiding this comment

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

Are we using the button from RDS design system?

Copy link
Author

Choose a reason for hiding this comment

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

Yes

@ZendeAditya
Copy link
Author

ZendeAditya commented Jan 15, 2025

Can you please check this @tejaskh3 @pankajjs

@ZendeAditya ZendeAditya requested a review from pankajjs January 15, 2025 13:29
@AnujChhikara
Copy link
Contributor

Hello @ZendeAditya can you please write test for you changes and attach test coverage in the description

@ZendeAditya
Copy link
Author

Hello @ZendeAditya can you please write test for you changes and attach test coverage in the description

Yes

Copy link
Member

@tejaskh3 tejaskh3 left a comment

Choose a reason for hiding this comment

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

Instead the icon you used,

Please use the icon that is shown in the screenshot, if it is not their please get that from dashboard site.
image

@ZendeAditya
Copy link
Author

Instead the icon you used,

Please use the icon that is shown in the screenshot, if it is not their please get that from dashboard site.
image

Ok I will add it

@ZendeAditya
Copy link
Author

@tejaskh3 @AnujChhikara
I have added the icon according to the screenshot and also wrote a test case for my code. please review again.

@ZendeAditya ZendeAditya requested a review from tejaskh3 January 17, 2025 15:14
@ZendeAditya
Copy link
Author

@tejaskh3 @AnujChhikara I have added the icon according to the screenshot and also wrote a test case for my code. please review again.

please check this

@pankajjs
Copy link
Member

Please make your changes behind feature flag.
Thank you.

@ZendeAditya
Copy link
Author

Please make your changes behind feature flag. Thank you.

Means?

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.

[FIX]: modal on the status site to update the task
5 participants