From 5018044872c054b06ae6071599c54b2c78fe4f94 Mon Sep 17 00:00:00 2001 From: "Brian E. McElaney" Date: Tue, 10 Oct 2023 11:52:28 -0400 Subject: [PATCH] Move copy story url to clipboard button to the story dropdown menu (#232) * Move copy story url to clipboard button to the story dropdown menu * Fix copy-to-clipboard popup alert position * Shift location of popup * fix css of the copy link message * fixed the options under the menu on the project show page --------- Co-authored-by: rishijain --- app/assets/stylesheets/project.scss | 19 +------------------ app/assets/stylesheets/stories.scss | 4 ++-- app/views/projects/show.html.erb | 14 +++++--------- 3 files changed, 8 insertions(+), 29 deletions(-) diff --git a/app/assets/stylesheets/project.scss b/app/assets/stylesheets/project.scss index d470e8d6..1a128dd9 100644 --- a/app/assets/stylesheets/project.scss +++ b/app/assets/stylesheets/project.scss @@ -267,24 +267,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; } } diff --git a/app/assets/stylesheets/stories.scss b/app/assets/stylesheets/stories.scss index 0a18c5c2..8f94a7b1 100644 --- a/app/assets/stylesheets/stories.scss +++ b/app/assets/stylesheets/stories.scss @@ -118,8 +118,8 @@ .popup { display: none; position: absolute; - top: 5px; - left: 30px; + right: 30px; + z-index: 50; background: #d9f1f1; height: 30px; width: 140px; diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 1bb4c6bb..bf0f7174 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -27,9 +27,9 @@ <% @stories.each do | story | %> + Copied to clipboard <%= link_to "#{story.id} - #{story.title}", [story.project, story] %> - <%= story.estimate_for(current_user)&.best_case_points %> <%= story.estimate_for(current_user)&.worst_case_points %> @@ -46,6 +46,10 @@ @@ -102,11 +100,9 @@
<%= link_to 'Return to Projects Page', projects_path, id: :back, class: "button" %> - <% if current_user.admin? %> <%= button_to is_unlocked?(@project) ? 'Lock Project' : 'Unlock Project', toggle_locked_project_path(@project.id), method: :patch, class: "button magenta", id: "lock-btn", remote: true %> <% end %> - <%= link_to 'Clone Project', new_clone_project_path(@project.id), class: "button green" %> <%= link_to 'Edit Project', edit_project_path(@project.id), class: "button green" %>