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

add link to "new contributor" labels #3864

Closed
5 tasks
first-timers bot opened this issue Oct 31, 2018 · 5 comments
Closed
5 tasks

add link to "new contributor" labels #3864

first-timers bot opened this issue Oct 31, 2018 · 5 comments
Labels
first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute

Comments

@first-timers
Copy link

first-timers bot commented Oct 31, 2018

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

🤔 What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

📋 Step by Step

  • 🙋 Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • 📝 Update the file app/models/node_tag.rb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Below is a "diff" showing in red (and a -) which lines to remove, and in green (and a +) which lines to add:

@@ -21,7 +21,7 @@ def author
 
   def new_author_contributor
     @uid = uid
-    return "<span class = 'label label-success'><i>New Contributor</i></span>".html_safe if Node.where(:uid => @uid).length === 1
+    return "<a href='/tag/first-time-poster' class='label label-success'><i>new contributor</i></a>".html_safe if Node.where(:uid => @uid).length === 1
   end
 
   def user
  • 💾 Commit your changes

  • 🔀 Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • 🏁 Done Ask in comments for a review :)

🤔❓ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

(This issue was created by First-Timers-Bot.)

@first-timers first-timers bot added first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute labels Oct 31, 2018
@jywarren
Copy link
Member

After this is done, we need a similar change in two other places:

def new_contributor
@uid = id
return "<span class = 'label label-success'><i>New Contributor</i></span>".html_safe if Node.where(:uid => @uid).length === 1
end

and

def new_author_contributor
@uid = uid
return "<span class = 'label label-success'><i>New Contributor</i></span>".html_safe if Node.where(:uid => @uid).length === 1
end
def new_contributor
@uid = id
return "<span class = 'label label-success'><i>New Contributor</i></span>".html_safe if Node.where(:uid => @uid).length === 1
end

We would also be very happy if someone wanted to try and consolidate these three pieces of code so they aren't redundant! So, multiple issues available here!

@leanyanko
Copy link
Contributor

🙋🙋🙋 @jywarren

leanyanko added a commit to leanyanko/plots2 that referenced this issue Oct 31, 2018
leanyanko added a commit to leanyanko/plots2 that referenced this issue Oct 31, 2018
@jywarren
Copy link
Member

Super! Thank you!!!

Next after this:

try and consolidate these three pieces of code so they aren't redundant

But it can be a follow-up PR once this one is closed.

jywarren pushed a commit that referenced this issue Oct 31, 2018
* Add range buttons to /tag/____ page #3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

#3864

* a href='/tag/first-time-poster'

#3864

* a href='/tag/first-time-poster'

#3864

* Remove unrelated issues
@leanyanko
Copy link
Contributor

Sure, @jywarren . Thanks!

Just to check, because I'm not really familiar with ruby. I'm going to declare new file contributor.rb,
move new_contributor there and include this file to all 3 models as
require_relative 'contributor', right?

I would also consider if I need both, new_contributor and new_author_contributer,

@jywarren
Copy link
Member

jywarren commented Nov 5, 2018

Hi, so sorry for the slow reply!!!

So basically you can just keep one of the three locations it already exists -- i think i prefer plots2/app/models/user.rb -- and for the others, just make them references to the user.rb version. So for the drupal_user versions, you could do:

def new_author_contributor 
  user.new_contributor
end 
  
def new_contributor 
  user.new_contributor
end 

That /should/ work... but also perhaps we can search the codebase entirely for new_author_contributor and replace all instances with new_contributor since it seems redundant?

Also, just a note that your initial work on this was already merged! So this pull request is no longer needed and you could close it if you wanted; the changes have already been accepted to the main publiclab repository: leanyanko#2

Thanks again, and if you want to open a new PR, please name it descriptively -- something like "remove redundancy of 'new_contributor' code" -- that way we can quickly help you get it reviewed and wrapped up.

🙌 🎉

jywarren pushed a commit that referenced this issue Dec 1, 2018
* Add range buttons to /tag/____ page #3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

#3864

* a href='/tag/first-time-poster'

#3864

* a href='/tag/first-time-poster'

#3864

* Remove unrelated issues

* remove redundancy of 'new_contributor' code

drupal_user

* remove redundancy of 'new_contributor' code

node_tag

* fix

* Update node_tag.rb

* Update node_tag.rb

* Update drupal_user.rb

* Update node_tag.rb

* Update node_tag.rb

* Update node_tag.rb

* Update tag_test.rb
jonxuxu pushed a commit to jonxuxu/plots2 that referenced this issue Dec 2, 2018
* Add range buttons to /tag/____ page publiclab#3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* Remove unrelated issues

* remove redundancy of 'new_contributor' code

drupal_user

* remove redundancy of 'new_contributor' code

node_tag

* fix

* Update node_tag.rb

* Update node_tag.rb

* Update drupal_user.rb

* Update node_tag.rb

* Update node_tag.rb

* Update node_tag.rb

* Update tag_test.rb
jywarren pushed a commit that referenced this issue Dec 5, 2018
* Add test for "self.gmil_quote_present?"

To solve part of #3435

* Add test for "self.gmail_quote_present?"

To solve part of #3435

* Bump skylight from 3.1.1 to 3.1.2 (#4080)

Bumps [skylight](https://github.com/skylightio/skylight-ruby) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/skylightio/skylight-ruby/releases)
- [Changelog](https://github.com/skylightio/skylight-ruby/blob/v3.1.2/CHANGELOG.md)
- [Commits](skylightio/skylight-ruby@v3.1.1...v3.1.2)

Signed-off-by: dependabot[bot] <[email protected]>

* updated scrypt and removed inserting new answer's text into comment form (#4049)

* fix header slightly covers .popover-content #3898 (#4041)

* fix header slightly covers .popover-content

* fix header slightly covers .popover-content #3898 (rebased)

* resolve merge conflicts

* change ssh key to http url

* Set git unshallow for travis to avoid danger bot issues (#3936)

* Inline wiki table formatting broken (#4081)

* fix for inline table

* removed additional file

* removed additional file

* removed additional file

* removed additional file

* tag fix for non-existent tags (#4084)

* tag fix

* Update tag_controller_test.rb

* Update tag_controller_test.rb

* Comment display on /comments (#4086)

* Test for power tag embedded grids (#4085)

* Update tag_controller_test.rb

* Update tag_controller.rb

* Update tag_controller.rb

* Update tag_controller_test.rb

* Update _nodes.html.erb

* Update restful_typeahead.js

* work on node.scraped_image, starting with test (#4077)

* starting with test

* fixes for scraped image!

* fallback lead images for other types

* revision fixture fix

* fixes

* Update node.rb

* additional tweaks

* Update notes_controller_test.rb

* Update revisions.yml

* Update node_test.rb

* Update revisions.yml

* Update nodes.yml

* fixes to question search (#4087)

* Add required (#4006)

* Remove redundancy of 'new_contributor' code (#3903)

* Add range buttons to /tag/____ page #3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

#3864

* a href='/tag/first-time-poster'

#3864

* a href='/tag/first-time-poster'

#3864

* Remove unrelated issues

* remove redundancy of 'new_contributor' code

drupal_user

* remove redundancy of 'new_contributor' code

node_tag

* fix

* Update node_tag.rb

* Update node_tag.rb

* Update drupal_user.rb

* Update node_tag.rb

* Update node_tag.rb

* Update node_tag.rb

* Update tag_test.rb

* Update restful_typeahead.js

* Create a comment_moderation mailer  (#4068)

* send mail to moderator when comment marked as spam

* changing email recipient

* changing recipient email in test

* changing recipient email in mailer test

* updated js deps (#4088)

* Update index.html.erb (#4090)

* Update _node_wiki.html.erb

* Bump omniauth-facebook from 4.0.0 to 5.0.0 (#3784)

Bumps [omniauth-facebook](https://github.com/mkdynamic/omniauth-facebook) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/mkdynamic/omniauth-facebook/releases)
- [Changelog](https://github.com/mkdynamic/omniauth-facebook/blob/master/CHANGELOG.md)
- [Commits](simi/omniauth-facebook@v4.0.0...v5.0.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Fixed duplicate pagination in search (#4089)

* Update _comment.html.erb

* Delete questions/_comment.html.erb (#4097)

* fileupload (#4095)

* Fix and test for inline grids in comments (#4096)

* Test for inline grids in comments

* Update _comment.html.erb

* Update comment_controller_test.rb

* Update comment_controller_test.rb

* Update _thumbnail.html.erb

* yarn upgrade test (#4099)

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update to include nokogiri requirement

* Update comment_test.rb

* Update gmail_parsing_test.rb

* Update comment_test.rb
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this issue May 5, 2019
* Add range buttons to /tag/____ page publiclab#3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* Remove unrelated issues
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this issue May 5, 2019
* Add range buttons to /tag/____ page publiclab#3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* Remove unrelated issues

* remove redundancy of 'new_contributor' code

drupal_user

* remove redundancy of 'new_contributor' code

node_tag

* fix

* Update node_tag.rb

* Update node_tag.rb

* Update drupal_user.rb

* Update node_tag.rb

* Update node_tag.rb

* Update node_tag.rb

* Update tag_test.rb
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this issue May 5, 2019
…liclab#4103)

* Add test for "self.gmil_quote_present?"

To solve part of publiclab#3435

* Add test for "self.gmail_quote_present?"

To solve part of publiclab#3435

* Bump skylight from 3.1.1 to 3.1.2 (publiclab#4080)

Bumps [skylight](https://github.com/skylightio/skylight-ruby) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/skylightio/skylight-ruby/releases)
- [Changelog](https://github.com/skylightio/skylight-ruby/blob/v3.1.2/CHANGELOG.md)
- [Commits](skylightio/skylight-ruby@v3.1.1...v3.1.2)

Signed-off-by: dependabot[bot] <[email protected]>

* updated scrypt and removed inserting new answer's text into comment form (publiclab#4049)

* fix header slightly covers .popover-content publiclab#3898 (publiclab#4041)

* fix header slightly covers .popover-content

* fix header slightly covers .popover-content publiclab#3898 (rebased)

* resolve merge conflicts

* change ssh key to http url

* Set git unshallow for travis to avoid danger bot issues (publiclab#3936)

* Inline wiki table formatting broken (publiclab#4081)

* fix for inline table

* removed additional file

* removed additional file

* removed additional file

* removed additional file

* tag fix for non-existent tags (publiclab#4084)

* tag fix

* Update tag_controller_test.rb

* Update tag_controller_test.rb

* Comment display on /comments (publiclab#4086)

* Test for power tag embedded grids (publiclab#4085)

* Update tag_controller_test.rb

* Update tag_controller.rb

* Update tag_controller.rb

* Update tag_controller_test.rb

* Update _nodes.html.erb

* Update restful_typeahead.js

* work on node.scraped_image, starting with test (publiclab#4077)

* starting with test

* fixes for scraped image!

* fallback lead images for other types

* revision fixture fix

* fixes

* Update node.rb

* additional tweaks

* Update notes_controller_test.rb

* Update revisions.yml

* Update node_test.rb

* Update revisions.yml

* Update nodes.yml

* fixes to question search (publiclab#4087)

* Add required (publiclab#4006)

* Remove redundancy of 'new_contributor' code (publiclab#3903)

* Add range buttons to /tag/____ page publiclab#3298

Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

* Update the file app/models/node_tag.rb

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* a href='/tag/first-time-poster'

publiclab#3864

* Remove unrelated issues

* remove redundancy of 'new_contributor' code

drupal_user

* remove redundancy of 'new_contributor' code

node_tag

* fix

* Update node_tag.rb

* Update node_tag.rb

* Update drupal_user.rb

* Update node_tag.rb

* Update node_tag.rb

* Update node_tag.rb

* Update tag_test.rb

* Update restful_typeahead.js

* Create a comment_moderation mailer  (publiclab#4068)

* send mail to moderator when comment marked as spam

* changing email recipient

* changing recipient email in test

* changing recipient email in mailer test

* updated js deps (publiclab#4088)

* Update index.html.erb (publiclab#4090)

* Update _node_wiki.html.erb

* Bump omniauth-facebook from 4.0.0 to 5.0.0 (publiclab#3784)

Bumps [omniauth-facebook](https://github.com/mkdynamic/omniauth-facebook) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/mkdynamic/omniauth-facebook/releases)
- [Changelog](https://github.com/mkdynamic/omniauth-facebook/blob/master/CHANGELOG.md)
- [Commits](simi/omniauth-facebook@v4.0.0...v5.0.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Fixed duplicate pagination in search (publiclab#4089)

* Update _comment.html.erb

* Delete questions/_comment.html.erb (publiclab#4097)

* fileupload (publiclab#4095)

* Fix and test for inline grids in comments (publiclab#4096)

* Test for inline grids in comments

* Update _comment.html.erb

* Update comment_controller_test.rb

* Update comment_controller_test.rb

* Update _thumbnail.html.erb

* yarn upgrade test (publiclab#4099)

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update comment_test.rb

* Update to include nokogiri requirement

* Update comment_test.rb

* Update gmail_parsing_test.rb

* Update comment_test.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute
Projects
None yet
Development

No branches or pull requests

2 participants