PublicLab.Editor
PublicLab.Editor copied to clipboard
Refine Title Module UI - fixes issue #762
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
- [ ] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with
grunt jasmine - [ ] code is in uniquely-named feature branch and has no merge conflicts
- [ ] PR is descriptively titled
- [ ] PR body includes
fixes #0000-style reference to original issue # - [ ] ask
@publiclab/reviewersfor help, in a comment below
We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!
If tests do fail, click on the red X to learn why by reading the logs.
Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!
I'm sorry I think there's a mistake, it was meant to be just 2 commits and not 10. I created a new branch and made just 2 commits to cover all the changes for this issue but I don't know how it pushed the older commits from the older branches that have been merged already. Do I have to delete the branches after they've been merged? Please guide me on how to do it right. @TildaDares
@NARUDESIGNS I use this gist https://gist.github.com/jordanbtucker/17b6c3c7cdaca12327d0 when I have unwanted commits in my PR. <commit> will be the latest commit hash (the last commit you added to this branch). The <branch> on line 2 will be main and the one on line 3 will be the name of this branch. I hope this helps. Let me know if you face any more issues.
@TildaDares thank you, I'd try that. But going forward, how do I prevent it from happening? Is it that I need to pull first on every new branch before making changes, committing and pushing?
Just make the branch you’re working on is updated with recent changes.
Just make the branch you’re working on is updated with recent changes.
Alright thanks, I think that's the problem. Also, do you mind if I just close this PR and open a new one? I'm a bit worried about using rebase.
@NARUDESIGNS Doing a rebase is safe but if you’re worried you can go ahead and open a new one
@NARUDESIGNS I use this gist https://gist.github.com/jordanbtucker/17b6c3c7cdaca12327d0 when I have unwanted commits in my PR.
<commit>will be the latest commit hash (the last commit you added to this branch). The<branch>on line 2 will bemainand the one on line 3 will be the name of this branch. I hope this helps. Let me know if you face any more issues.
I was evaluating this. The last 2 commits are the only commits I intended for this PR. If I do git reset --hard <commit> on the last commit, the other commits will remain since they came before the last commit. If I do it on any other commit, the new commit will be discarded and I stand a chance to loose my changes.
From my past experience using git reset <commit> it points to the specified commit and discards other commits that comes afterwards.
git rebase allows you to pick and drop commits.
@NARUDESIGNS Doing a rebase is safe but if you’re worried you can go ahead and open a new one
Hi @TildaDares so I'm trying this out (first time using rebase anyway). From line 2 in the guide you shared, I did
git rebase -i upstream/main
I get this error
fatal: invalid upstream 'upstream/main'
Am I doing it wrong? am I supposed to just do
git rebase -i main
?
@NARUDESIGNS I think it’s supposed to be the name of your branch. My bad!
@NARUDESIGNS I think it’s supposed to be the name of your branch. My bad!
I still get the error when I put my branch name.
fatal: invalid upstream 'upstream/refine-ple-title-module-UI'
Should I use upstream or origin? I think upstream should be the original PublicLab repo but origin should be my forked version right? @TildaDares
@NARUDESIGNS I just ran the same command on my local repo and it worked
@TildaDares what branch were you on when you did this? Main? or the affected branch (in my case refine-ple-title-module-UI)?
@NARUDESIGNS I was on a branch I just created
@NARUDESIGNS I was on a branch I just created
Same here, I wonder why I'm getting that error. You also forked the PublicLab.editor repo which is where you are creating these branches and making these changes right?
@NARUDESIGNS Yes
@NARUDESIGNS This article might help https://luisdalmolin.dev/blog/branched-off-the-wrong-branch-in-git/
Thanks, let me check it out. @TildaDares
It worked!!! 🥳
Thank you so much @TildaDares
I used git cherry-pick <commit> since it allowed me to pick the commits I want.
I will appreciate it if you can share with me some tips on how you find useful resources for your issue 🙏
@NARUDESIGNS I’m glad that article helped you out.
I don’t really have special tricks I use for finding resources, I just search google. Just make sure the search text is descriptive. For example, when I was searching for a resource to help you out, I just entered How to fix a branch that was branched from a feature branch into the search bar.
Thank you, I've learnt a lot from our conversation and this issue as well. Please help review the changes and let me know what I have to do. It is the second week already and I can't wait to start checking items off my list.
Also I wanted to ask, after a PR has been merged, it is safe to delete the branch locally right?
@NARUDESIGNS Yes it’s safe to delete the branch after it has been merged.
@NARUDESIGNS Can you add a link to the issue this PR is resolving?
Great! Thanks. I look forward to your feedback on this PR. Let me know if you need screenshots or anything at all you need me to revisit or provide. @TildaDares
@NARUDESIGNS Can you add a link to the issue this PR is resolving?
Here it is #762 It is from my planning task list. I used that button you discovered to convert the task into an issue.
@NARUDESIGNS Can you add before and after pics of the UI change?
It doesn’t have to be now. You can do it later.
Here


I’ll send a review in the morning. Thanks!