-
Notifications
You must be signed in to change notification settings - Fork 132
fixed row and column subtract button values for issue #755 #757
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 row and column subtract button values for issue #755 #757
Conversation
|
Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help. |
TildaDares
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @NARUDESIGNS, your formatter/linter has added more changes than required. Do you think you could disable your linter and then undo the changes it added? Thank you!
| $(document).on('click', '#decRows', function() { | ||
| $("#tableRows").text( Number($("#tableRows").text()) - 1 ); | ||
| if (Number($('#tableRows').text()) > 1) { | ||
| $('#tableRows').text(Number($('#tableRows').text()) - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Number($('#tableRows').text()) value should be assigned to a variable so that there's less repetition. The same thing applies to lines 76-77. Thanks!
Also, you need to run grunt build to compile into /dist/PublicLab.Editor.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK thank you. Do I have to push the dist/PublicLab.Editor.js changes as well?
I only pushed the file where I added those if conditions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you also have to push the changes in the ‘dist’ folder.
OK I will, thanks for pointing out. |
This reverts commit 895574e.
|
@TildaDares I've reverted the changes, disabled prettier (my formatter), created a variable and made the changes. Please review and feedback. |
| $(".wk-commands, .wk-switchboard").addClass("btn-group"); | ||
| $(".wk-commands button, .wk-switchboard button").addClass( | ||
| "btn btn-light" | ||
| "btn btn-outline-secondary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @NARUDESIGNS, is this change related to this PR?
Everything else looks great btw. Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TildaDares this change happens automatically when I work on src/modules/PublicLab.RichTextModule.Table.js and I don't know why. Do I need to take it out manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NARUDESIGNS Undo the changes and then do a push. Let's see if that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should undo the changes just for dist/Publiclab.Editor.js right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TildaDares this change happens automatically when I work on src/modules/PublicLab.RichTextModule.Table.js and I don't know why. Do I need to take it out manually?
Also just to update you, this automatic change (addition of "btn btn-outline-secondary" property) in the dist/Publiclab.Editor.js happens in my local env just before I push to remote repo this is why I was asking you if I need to manually remove the change.
@TildaDares
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @NARUDESIGNS, I'm not sure why but that change is added every time you run grunt build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is with this commit b1cb346. grunt build was supposed to be run after adding the change so every time anyone else runs grunt build, it adds that change to the dist folder.
Leave the change in one of your PRs and remove it from the other. All you have to do is undo just that line of change after running grunt build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thank you very much. I have removed it after running grunt build for PR #758 while the change remains here on PR #757 just like you advised.
Please review, thank you so much for your time @TildaDares
TildaDares
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @NARUDESIGNS. LGTM!
Could you add a screen recording of the change just to make sure everything works as it should? Thank you!
|
Sure, not a problem. I will! |
|
Hi, @TildaDares here's a short screen record to show you how it behaves now. publiclab_sub-btn.mov |
|
This one is nice and simple, so let's merge it! It's not complex enough to need a test. Thanks! |
|
Congrats on merging your first pull request! 🙌🎉⚡️ Help others take their first stepNow that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step. 🙌 Try looking at this list of `first-timers-only` issues, and see if someone else is waiting for feedback, or even stuck! 😕 People often get stuck at the same steps, so you might be able to help someone get unstuck, or help lead them to some documentation that'd help. Reach out and be encouraging and friendly! 😄 🎉 Read about how to help support another newcomer here, or find other ways to offer mutual support here. |
|
Merged! |
Fixed issue with the row and column subtract buttons. These buttons when clicked previously yielded a negative text value in the button. However, with the new fix, the text values shouldn't be any less than 1 row and 1 column as a table generally should have at least 1 row and 1 column.
Please help review and feedback @TildaDares @jywarren
Thank you.