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

[52, 53, 126] Dashboard Component / Challenge Manager's Dashboard / Evaluator's Dashboard #136

Merged
merged 55 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
8c1faf3
government banner
stonefilipczak Jul 23, 2024
65e05eb
Merge branch 'dev' into 25_eval_header
stonefilipczak Aug 7, 2024
9e3f4d7
header
stonefilipczak Aug 7, 2024
6b758b0
mobile nav
stonefilipczak Aug 8, 2024
7c1e8be
progress
stonefilipczak Aug 15, 2024
589baf3
logged out
stonefilipczak Aug 19, 2024
f2e0424
Merge branch 'dev' into 25_eval_header
stonefilipczak Aug 19, 2024
4e770a9
sub nav
stonefilipczak Aug 19, 2024
b618daa
mobile nav minutae
stonefilipczak Aug 19, 2024
8e9a0c4
Apply suggestions from code review
stonefilipczak Aug 21, 2024
6b50585
conditional rendering on logged in state
stonefilipczak Aug 22, 2024
79f8309
user role conditionals
stonefilipczak Aug 22, 2024
28a6fe7
add test
stonefilipczak Aug 22, 2024
532e88e
styling minutae
stonefilipczak Aug 22, 2024
1c8ffda
remove trailing whitespace
stonefilipczak Aug 22, 2024
ebd7921
?
stonefilipczak Aug 22, 2024
2f168d3
Apply suggestions from code review
stonefilipczak Aug 26, 2024
0833135
refactor conditional render
stonefilipczak Aug 26, 2024
3312eef
refactor desktop utility menu links into rails helper/partial
stonefilipczak Aug 26, 2024
6fc45ac
shared specs for utility menu
stonefilipczak Aug 26, 2024
9e45fe9
Merge branch 'dev' into 25_eval_header
stepchud Aug 27, 2024
1bcf5d9
make utility menu more responsive
stepchud Aug 27, 2024
824a4bc
add specs for user roles and install pry
stonefilipczak Aug 27, 2024
91b5739
refactor utility menu links for mobile
stonefilipczak Aug 27, 2024
52454b5
no wrap on utility links
stonefilipczak Aug 27, 2024
19f2579
create login user method for specs
stonefilipczak Aug 27, 2024
147fccb
Merge branch 'dev' into 25_eval_header
stepchud Aug 27, 2024
3532264
extend header tests to dashboard route
stonefilipczak Aug 28, 2024
6173cec
address what linter believes to be duplicated code blocks
stonefilipczak Aug 28, 2024
b1301c6
remove trailing whitespace
stonefilipczak Aug 28, 2024
acbed7e
give contexts more specific names to please linter
stonefilipczak Aug 28, 2024
0138b5f
fun with lint
stonefilipczak Aug 28, 2024
06f1b32
bundle exec rubocop -A
stonefilipczak Aug 28, 2024
c7693cd
refactor to please rubocop
stonefilipczak Aug 28, 2024
21302ae
WIP
stonefilipczak Aug 29, 2024
7020ffe
wwip
stonefilipczak Aug 30, 2024
f0ee5c3
wippp
stonefilipczak Aug 30, 2024
3a1dab8
Merge branch '25_eval_header' into 53_dashboard_component
stonefilipczak Aug 30, 2024
e75243d
styling
stonefilipczak Aug 30, 2024
0d0ab29
add test
stonefilipczak Aug 30, 2024
835d601
rubocop
stonefilipczak Aug 30, 2024
517e551
reorder
stonefilipczak Aug 30, 2024
7329ed5
Merge branch 'dev' into 53_dashboard_component
stepchud Sep 3, 2024
bbcb961
Delete app/views/navigation/_utility_menu_link_mobile.html.erb
stepchud Sep 3, 2024
f0eecb4
Delete app/views/navigation/_utility_menu_link_desktop.html.erb
stepchud Sep 3, 2024
90e6f8c
small refactor
stepchud Sep 3, 2024
7ddfc89
Merge branch 'dev' into 53_dashboard_component
stonefilipczak Sep 10, 2024
0d79c21
add challenges
stonefilipczak Sep 10, 2024
d4deb0f
push last dashboard item to the left if it's odd
stonefilipczak Sep 10, 2024
b72eeef
remove solver
stonefilipczak Sep 10, 2024
1643f90
evaluator dashboard
stonefilipczak Sep 10, 2024
53ef721
fix spex
stonefilipczak Sep 10, 2024
0fe4d85
refactor for clarity
stonefilipczak Sep 16, 2024
ce1cd44
Merge branch 'dev' into 53_dashboard_component
stepchud Sep 16, 2024
5a87221
cleanup some css classes, add specs for a11y
stepchud Sep 16, 2024
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
9 changes: 9 additions & 0 deletions app/assets/uswds/_uswds-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ Add a list of changed settings in the form $setting: value.
.usa-footer__secondary-section .usa-social-link:hover .usa-social-link__icon {
background-color: white;
}

.dashboard-container {
@media (min-width:1025px) {
// pushes the last child to the left if it's odd
:nth-last-child(1):nth-child(odd) {
margin-right: calc(45% - 1rem)
}
stepchud marked this conversation as resolved.
Show resolved Hide resolved
}
}
20 changes: 15 additions & 5 deletions app/helpers/dashboard_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,33 @@ module DashboardHelper
def dashboard_cards_by_role
{
challenge_manager: [
{ image_path: 'folder_open', href: 'manage_submissions', alt: 'submissions', title: 'Submissions',
{ image_path: 'emoji_events', href: 'http://localhost:4000/', alt: 'challenges', title: 'Challenges',
Copy link
Contributor

Choose a reason for hiding this comment

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

note to self: update this URL and other hard-coded localhost:4000 when #128 merges

subtitle: 'Create and manage challenges.' },
{ image_path: 'people', href: 'manage_submissions', alt: 'submissions', title: 'Submissions',
subtitle: 'Manage submissions, evaluations, and evaluators.' },
{ image_path: 'content_copy', href: 'evaluation_forms', alt: 'evaluation forms', title: 'Evaluation Forms',
subtitle: 'Create and manage evaluation forms.' },
{ image_path: 'map', href: 'user_guide', alt: 'user guides', title: 'User Guides',
{ image_path: 'map', href: 'user_guide', alt: 'resources', title: 'Resources',
subtitle: 'Learn how to make the most of the platform.' },
{ image_path: 'support_agent', href: 'federal-agency-faqs', alt: 'help', title: 'Help',
subtitle: 'Get support on the Challenge.Gov platform.' }
],
solver: [],
evaluator: []
evaluator: [
{ image_path: 'content_copy', href: 'manage_submissions', alt: 'submissions', title: 'Submissions',
subtitle: 'Evaluate my assigned submissions.' },
{ image_path: 'map', href: 'user_guide', alt: 'user guides', title: 'Resources',
subtitle: 'Learn how to make the most of the platform.' },
{ image_path: 'support_agent', href: 'federal-agency-faqs', alt: 'help', title: 'Help',
subtitle: 'Get support on the Challenge.Gov platform.' }
],
solver: []
}
end

def dashboard_title
{
challenge_manager: "Challenge Manager Evaluation Dashboard"
challenge_manager: "Challenge Manager Evaluation Dashboard",
evaluator: "Evaluator Dashboard"
}
end
end
4 changes: 2 additions & 2 deletions app/views/dashboard/_dashboard.html.erb
stonefilipczak marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<h2><%= dashboard_title[role] %></h2>
<div class="display-flex flex-wrap desktop:grid-row flex-justify-center width-full">
<div class="display-flex flex-wrap desktop:grid-row dashboard-container flex-justify-center width-full">
<% dashboard_cards_by_role[role].each do |card| %>
<%= link_to(card[:href],
class: "display-flex bg-primary-darker text-white flex-align-center desktop:grid-col " \
"grid-gap-1 desktop:margin-x-1 margin-y-1 desktop:grid-col-5 text-no-underline",
) do %>
<%= image_tag(
"images/usa-icons/#{card[:image_path]}.svg",
class: "usa-icon--size-7 icon-white margin-x-2 justify-self-center align-self-center",
class: "usa-icon--size-7 icon-white margin-x-2",
alt: card[:alt]
)%>
<div class="margin-right-2" >
Expand Down
Loading