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

Fixes carousel bug #199

Merged
merged 2 commits into from
Nov 17, 2022
Merged

Fixes carousel bug #199

merged 2 commits into from
Nov 17, 2022

Conversation

vasucp1207
Copy link
Contributor

Screen.Recording.2022-11-12.at.6.31.42.PM.mov

@CLAassistant
Copy link

CLAassistant commented Nov 12, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@Palanikannan1437 Palanikannan1437 left a comment

Choose a reason for hiding this comment

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

Hey @vasucp1207, it's not a good idea to commit package-lock.json, it'll cause problems for others most of the time. Please make the necessary changes to your PR

Thank you 😊

@Palanikannan1437
Copy link
Contributor

Palanikannan1437 commented Nov 12, 2022

Hey @vasucp1207, sorry for not being very clear...you didn't have to delete the package-lock.json file, you just have to remove it from your PR.

One approach could be...you could revert your old commit's changes by soft resetting to the commit before that and then force push your changes again such that your package-lock.json isn't there in your git diff.

Thank you 😄

@vasucp1207
Copy link
Contributor Author

vasucp1207 commented Nov 12, 2022

@Palanikannan1437, I do not change anything in package.json, I don't know how it changes automatically.
I commit the changes but it appears again can you help me?

@Palanikannan1437
Copy link
Contributor

Palanikannan1437 commented Nov 12, 2022

@Palanikannan1437, I do not change anything in package.json, I don't know how it changes automatically.
I commit the changes but it appears again can you help me?

Hey yeah sure, so when you install a package using the npm install .... command or if it's internally run due to our existing scripts, the package.lock.json is generated/modified

So basically while staging your files before committing, instead of git add . you'd have to manually stage the files you changed and want to commit.😄

@vasucp1207
Copy link
Contributor Author

@Palanikannan1437 I remove the package-lock.json is it okay now please tell me.

@Palanikannan1437
Copy link
Contributor

Palanikannan1437 commented Nov 12, 2022

@Palanikannan1437 I remove the package-lock.json is it okay now please tell me.

Sorry, but still it's in the git diff

image

Hey @vasucp1207, sorry for not being very clear...you didn't have to delete the package-lock.json file, you just have to remove it from your PR.

One approach could be...you could revert your old commit's changes by soft resetting to the commit before that and then force push your changes again such that your package-lock.json isn't there in your git diff.

Thank you 😄

Please try to research and follow up on this approach of soft resetting and force pushing in git and let us know if you face any issues. Thank you!

@vasucp1207
Copy link
Contributor Author

@Palanikannan1437 I think it's done now.

@Palanikannan1437
Copy link
Contributor

Hey @vasucp1207, that was a great catch and thank you for your valuable contribution!

But currently there's no need to change the existing custom button ui/button component on our slider...instead it'd be better if you could debug and add the missing onClick method on our custom PrevArrow and NextArrow by going through react-slick's custom arrow documentation.

Thank you and hope to see your PR get merged soon 😄

@Palanikannan1437
Copy link
Contributor

@Palanikannan1437 I think it's done now.

That was awesome and kudos on being able to remove the package-lock.json from your PR!!

Hope you got to learn something out of it!!

@vasucp1207
Copy link
Contributor Author

@Palanikannan1437, but what is the need to add the custom arrows when react-slick provides the arrows by default?

@Palanikannan1437
Copy link
Contributor

Palanikannan1437 commented Nov 13, 2022

@Palanikannan1437, but what is the need to add the custom arrows when react-slick provides the arrows by default?

Hey, I'm not sure but it was a design choice made by our contributors...and since there's just a small function they missed, there's no need to remove the entire existing button components but instead you could add the missing function.

@Sing-Li ,@Dnouv and @irffanasiff could better guide here, thank you!

@Sing-Li
Copy link
Member

Sing-Li commented Nov 15, 2022

@vasucp1207 Yes. As @Palanikannan1437 mentioned --> the custom arrows are BY DESIGN. We had a designer contributor making sure that the UI elements are consistent, color schemes are attractive etc. This is typical of all production project. You can't use the default "just because it is there". Please update your PR asap.

@vasucp1207
Copy link
Contributor Author

vasucp1207 commented Nov 16, 2022

@Sing-Li, fixed.

@@ -23,6 +25,7 @@ const PrevArrow = ({ currentSlide, slideCount, ...props }) => {
};

const NextArrow = ({ currentSlide, slideCount, ...props }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could simply de-structure the onClick method here itself! Thank you!

@@ -5,6 +5,7 @@ import 'slick-carousel/slick/slick-theme.css';
import Image from "next/image";

const PrevArrow = ({ currentSlide, slideCount, ...props }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise, you could de-structure the onClick method here itself! Thank you!

@Palanikannan1437
Copy link
Contributor

LGTM @vasucp1207 !! 🥳

@Sing-Li I've reviewed the changes, please consider merging them, thank you!

@Sing-Li
Copy link
Member

Sing-Li commented Nov 17, 2022

Congrats @vasucp1207

@Sing-Li Sing-Li merged commit 5efcf37 into RocketChat:master Nov 17, 2022
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.

4 participants