PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Refine Title Module UI - fixes issue #762

Open NARUDESIGNS opened this issue 3 years ago • 40 comments

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/reviewers for 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!

NARUDESIGNS avatar Dec 11 '21 23:12 NARUDESIGNS

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 avatar Dec 11 '21 23:12 NARUDESIGNS

@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 avatar Dec 13 '21 08:12 TildaDares

@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?

NARUDESIGNS avatar Dec 13 '21 09:12 NARUDESIGNS

Just make the branch you’re working on is updated with recent changes.

TildaDares avatar Dec 13 '21 09:12 TildaDares

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 avatar Dec 13 '21 10:12 NARUDESIGNS

@NARUDESIGNS Doing a rebase is safe but if you’re worried you can go ahead and open a new one

TildaDares avatar Dec 13 '21 11:12 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.

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.

NARUDESIGNS avatar Dec 14 '21 13:12 NARUDESIGNS

git rebase allows you to pick and drop commits.

TildaDares avatar Dec 14 '21 14:12 TildaDares

@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 avatar Dec 14 '21 23:12 NARUDESIGNS

@NARUDESIGNS I think it’s supposed to be the name of your branch. My bad!

TildaDares avatar Dec 15 '21 06:12 TildaDares

@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 avatar Dec 15 '21 09:12 NARUDESIGNS

@NARUDESIGNS I just ran the same command on my local repo and it worked

Screenshot 2021-12-15 at 13 19 04

TildaDares avatar Dec 15 '21 12:12 TildaDares

@TildaDares what branch were you on when you did this? Main? or the affected branch (in my case refine-ple-title-module-UI)?

NARUDESIGNS avatar Dec 15 '21 12:12 NARUDESIGNS

@NARUDESIGNS I was on a branch I just created

TildaDares avatar Dec 15 '21 12:12 TildaDares

@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 avatar Dec 15 '21 12:12 NARUDESIGNS

@NARUDESIGNS Yes

TildaDares avatar Dec 15 '21 12:12 TildaDares

@NARUDESIGNS This article might help https://luisdalmolin.dev/blog/branched-off-the-wrong-branch-in-git/

TildaDares avatar Dec 15 '21 12:12 TildaDares

Thanks, let me check it out. @TildaDares

NARUDESIGNS avatar Dec 15 '21 12:12 NARUDESIGNS

gitpod-io[bot] avatar Dec 15 '21 18:12 gitpod-io[bot]

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 avatar Dec 15 '21 18:12 NARUDESIGNS

@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.

TildaDares avatar Dec 15 '21 18:12 TildaDares

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 avatar Dec 15 '21 18:12 NARUDESIGNS

@NARUDESIGNS Yes it’s safe to delete the branch after it has been merged.

TildaDares avatar Dec 15 '21 21:12 TildaDares

@NARUDESIGNS Can you add a link to the issue this PR is resolving?

TildaDares avatar Dec 15 '21 21:12 TildaDares

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 avatar Dec 15 '21 21:12 NARUDESIGNS

@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 avatar Dec 15 '21 21:12 NARUDESIGNS

@NARUDESIGNS Can you add before and after pics of the UI change?

TildaDares avatar Dec 15 '21 21:12 TildaDares

It doesn’t have to be now. You can do it later.

TildaDares avatar Dec 15 '21 21:12 TildaDares

Here TitleModule

TitleModule-mobile

NARUDESIGNS avatar Dec 15 '21 21:12 NARUDESIGNS

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

TildaDares avatar Dec 15 '21 21:12 TildaDares