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

Use same styles for buttons at /profile #4285

Closed
5 tasks
oorjitchowdhary opened this issue Dec 12, 2018 · 4 comments
Closed
5 tasks

Use same styles for buttons at /profile #4285

oorjitchowdhary opened this issue Dec 12, 2018 · 4 comments

Comments

@oorjitchowdhary
Copy link
Member

Hi, this is a first-timers-only issue made from #4280. 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 in the plots2 repository (press the little pen Icon) and edit the line as shown below.

Problem

The buttons below tags at /profile are not using consistent styles.

screenshot 113

Code link

<a class="btn btn-default btn-sm btn-block" href="/feed/<%= @user.name %>.rss"><i class="fa fa-rss" style="color:orange;"></i> <%= t('users.profile.rss_feed_for') %> <%= @user.name %></a>
<% if current_user && current_user.uid == @user.uid %>
<a href="/profile/<%= @user.name %>/edit" class="btn btn-default btn-sm btn-block"><i class="fa fa-pencil"></i> <%= t('users.profile.edit_profile') %></a>
<% end %>
</p>
<% if @profile_user && current_user && @profile_user == current_user %>
<button id="btn-token" class="btn btn-default btn-block">My Access Token</button>
<% end %>
<% if @profile_user && current_user && @profile_user == current_user %>
<button data-toggle="modal" data-target="#socialModal" class="btn btn-default btn-block">Link Social media</button>

Solution

We can use the same class="btn btn-default btn-block" for all buttons rather than using two classes.

- <a class="btn btn-default btn-sm btn-block" href="/feed/<%= @user.name %>.rss"><i class="fa fa-rss" style="color:orange;"></i> <%= t('users.profile.rss_feed_for') %> <%= @user.name %></a> 
   <% if current_user && current_user.uid == @user.uid %>
+ <a class="btn btn-default btn-block" href="/feed/<%= @user.name %>.rss"><i class="fa fa-rss" style="color:orange;"></i> <%= t('users.profile.rss_feed_for') %> <%= @user.name %></a> 
   <% if current_user && current_user.uid == @user.uid %>
- <a href="/profile/<%= @user.name %>/edit" class="btn btn-default btn-sm btn-block"><i class="fa fa-pencil"></i> <%= t('users.profile.edit_profile') %></a> 
   <% end %>
+ <a href="/profile/<%= @user.name %>/edit" class="btn btn-default btn-block"><i class="fa fa-pencil"></i> <%= t('users.profile.edit_profile') %></a> 
   <% end %>
 </p> 
  
 <% if @profile_user && current_user && @profile_user == current_user %> 
   <button id="btn-token" class="btn btn-default btn-block">My Access Token</button> 
 <% end %> 
  
 <% if @profile_user && current_user && @profile_user == current_user %> 
   <button data-toggle="modal" data-target="#socialModal" class="btn btn-default btn-block">Link Social media</button>

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

  • 💾 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!

@IshaGupta18
Copy link
Collaborator

Thank you for assigning me this issue @oorjitchowdhary !

@oorjitchowdhary
Copy link
Member Author

Welcome to Public Lab!

IshaGupta18 added a commit to IshaGupta18/plots2 that referenced this issue Dec 12, 2018
IshaGupta18 added a commit to IshaGupta18/plots2 that referenced this issue Dec 12, 2018
IshaGupta18 added a commit to IshaGupta18/plots2 that referenced this issue Dec 12, 2018
@IshaGupta18
Copy link
Collaborator

Kindly ignore these commits for now, I have removed them. I am creating a new branch for my task and push that branch, then make a pull request. I hope I haven't cause any trouble, I am just trying to learn the workflow. Thank you all!

@IshaGupta18
Copy link
Collaborator

I have made the pull request for this issue. I hope #4288 is the link to the request. I am waiting for an approval. I am highly obliged for assigning me this issue and I sincerely hope this works out. Thank you all very much!

SidharthBansal pushed a commit that referenced this issue Dec 18, 2018
* fixes #4285 Use same styles for buttons at /profile

* fixes #4278 'Follow' icon is the same as 'number of views' icon
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this issue May 5, 2019
…#4294)

* fixes publiclab#4285 Use same styles for buttons at /profile

* fixes publiclab#4278 'Follow' icon is the same as 'number of views' icon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants