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

Move copy story url to clipboard button to the story dropdown menu #232

Merged
merged 7 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions app/assets/stylesheets/project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -263,24 +263,7 @@
i {
position: relative;
border-radius: 50%;
padding: 5px;
opacity: 0;
transition: transform 0.5s, opacity 0.5s;
transform: translateX(-100%);
}

&:hover {
i {
opacity: 1;
transform: translateX(0);
}
}

&:active {
i {
background: #f70a7c;
color: white;
}
padding-right: 5px;
}
}

Expand Down
2 changes: 0 additions & 2 deletions app/assets/stylesheets/stories.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@
.popup {
display: none;
position: absolute;
top: 5px;
left: 30px;
background: #d9f1f1;
height: 30px;
width: 140px;
Expand Down
12 changes: 10 additions & 2 deletions app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
<% if @stories.present? %>
<% @stories.each do | story | %>
<tr class="project-table__row project-table__row--story" id="<%= dom_id(story)%>" >
<td class="project-table__cell">
<td class="project-table__cell"><span class="popup">Copied to clipboard</span>
mcelaney marked this conversation as resolved.
Show resolved Hide resolved
<input type="checkbox" name="stories[]" value=<%= story.id %>>
<%= link_to story.title, [story.project, story] %>
<button class="copy-link btn-clipboard" data-clipboard-text="<%= project_story_url(@project, story) %>" title='Copy story'><i class="fa fa-link"></i><span class= "popup">Copied to clipboard</span></button>
</td>
<td class="project-table__cell"><%= story.estimate_for(current_user)&.best_case_points %></td>
<td class="project-table__cell"><%= story.estimate_for(current_user)&.worst_case_points %></td>
Expand All @@ -48,6 +47,15 @@
<i class="fa fa-pencil-square-o"></i>
<span>Edit</span>
<% end %>



<button class="copy-link btn-clipboard" data-clipboard-text="<%= project_story_url(@project, story) %>" title='Copy story'>
<i class="fa fa-link"></i>Copy Link</button>




<%= link_to new_project_story_path(@project.id, story_id: story.id), class: "clone", title: "Clone" do %>
<i class="fa fa-files-o"></i>
<span>Clone</span>
Expand Down