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

Refactor ProfileImage #5803

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

websebdev
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

As suggested by @citizen428, here's the minor refactor to go from ProfileImage.new.get(150) to ProfileImage.new.get(width: 150). This makes the get method more explicit on what it actually does and also allows later, if needed, to easily add more optional arguments like height.

Related Tickets & Documents

#5583 (comment)

Added to documentation?

  • docs.dev.to
  • readme
  • no documentation needed

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 29, 2020
@citizen428 citizen428 self-requested a review January 29, 2020 03:51
citizen428
citizen428 previously approved these changes Jan 29, 2020
Copy link
Contributor

@citizen428 citizen428 left a comment

Choose a reason for hiding this comment

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

I ❤️ this so much, I think it's way easier for the reader of the code. Thanks @seb1441!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 29, 2020
rhymes
rhymes previously approved these changes Jan 29, 2020
Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

LGTM!

Zhao-Andy
Zhao-Andy previously approved these changes Jan 29, 2020
Copy link
Contributor

@Zhao-Andy Zhao-Andy left a comment

Choose a reason for hiding this comment

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

Great refactor, thanks for the PR!

@mstruve
Copy link
Contributor

mstruve commented Feb 6, 2020

Shoot, we waited a little too long on this! @seb1441 any chance you can resolve the conflict that we have? Or maybe @rhymes can do it quickly since he is very familiar with those API builders.

@rhymes
Copy link
Contributor

rhymes commented Feb 7, 2020

For some reason, probably permissions, I can't resolve this conflict:

Screenshot_2020-02-07 Refactor ProfileImage by seb1441 · Pull Request #5803 · thepracticaldev dev to

I rebased the branch manually to see where the conflict was and the issue is that app/views/api/v0/users/me.json.jbuilder does not exist anymore in master.

These are the steps to do it manually:

$ git rebase master # with master up to date
$ git rm app/views/api/v0/users/me.json.jbuilder
$ git rebase --continue
$ git push -f # if you have permission to write to this PR

@websebdev websebdev dismissed stale reviews from Zhao-Andy, rhymes, and citizen428 via a43f004 February 7, 2020 01:18
@websebdev websebdev force-pushed the seb1441/refactor-profile-image branch from 1dedbd1 to a43f004 Compare February 7, 2020 01:18
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Feb 7, 2020
@websebdev
Copy link
Contributor Author

@rhymes Thank you for the steps, it worked perfectly. Weird that you had permissions issues. When I create PR's, I always check the box to let the maintainers have access to my repo. Maybe because the permissions are only on the branch related and not the master branch?

@mstruve Conflict fixed!

@rhymes
Copy link
Contributor

rhymes commented Feb 7, 2020

@seb1441 it looks like there are a few broken specs this time around https://travis-ci.com/thepracticaldev/dev.to/builds/147858632 - likely new specs using the old signature, that entered with the rebase :)

Sorry for this!

@websebdev websebdev force-pushed the seb1441/refactor-profile-image branch from a43f004 to 083ae33 Compare February 7, 2020 02:56
@websebdev
Copy link
Contributor Author

@rhymes Newly added tests fixed :)

Copy link
Contributor

@citizen428 citizen428 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @seb1441!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Feb 7, 2020
@mstruve mstruve requested a review from rhymes February 7, 2020 13:46
Copy link
Contributor

@mstruve mstruve left a comment

Choose a reason for hiding this comment

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

Thank you @seb1441 for your patience with this, I plan on getting this merged later today(unless someone beats me to it) to avoid any more conflicts!!!

@benhalpern benhalpern merged commit 665f5aa into forem:master Feb 7, 2020
@pr-triage pr-triage bot removed the PR: reviewed-approved bot applied label for PR's where reviewer approves changes label Feb 7, 2020
@pr-triage pr-triage bot added the PR: merged bot applied label for PR's that are merged label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants