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

Remove activities and proposals from dashboard, rename portal #164

Merged
merged 4 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ html, body {

#dashboard-row {
height: 100%;
width: 100%;
margin: 0 !important;
}

Expand Down
14 changes: 0 additions & 14 deletions app/views/home/dashboard.html+mobile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
<div id="chat" class="tab-pane fade">
<%= render 'chat' %>
</div>
<div id="activities" class="tab-pane fade">
<%= render 'activities' %>
</div>
<div id="proposals" class="tab-pane fade">
<%= render 'proposals' %>
</div>
</div>
</div>
<div id="navigation">
Expand All @@ -28,14 +22,6 @@
<a class="nav-link" data-toggle="pill" href="#chat">
<i class="fa fa-comments"></i>
</a></li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#activities">
<i class="fa fa-bell"></i>
</a></li>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#proposals">
<i class="fa fa-envelope-open"></i>
</a></li>
</ul>
</div>
</div>
6 changes: 0 additions & 6 deletions app/views/home/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,4 @@
<div class="col-md" id="chat-container">
<%= render 'chat' %>
</div>
<div class="col-sm" id="activities-container">
<%= render 'activities' %>
</div>
<div class="col-sm" id="proposals-container">
<%= render 'proposals' %>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/layouts/_navbar.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%# https://getbootstrap.com/docs/4.5/components/navbar/ %>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<div class="navbar-brand">Connection Portal</div>
<div class="navbar-brand"><%= I18n.t('index.portal_name') %></div>
<form class="form-inline">
<i class="fa fa-bell" style="color: white; padding: 10px"></i>
<a href="<%= search_users_path %>"><i class="fa fa-search" style="color: white; padding: 10px"></i> </a>
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/_shared_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<title>Connections Portal</title>
<title><%= I18n.t('index.portal_name') %></title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<script>document.current_user = <%= user_signed_in? ? current_user.id : -1 %></script>
1 change: 0 additions & 1 deletion app/views/layouts/desktop.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<body>
<div id="app">
<%= render "layouts/navbar" %>
<script>document.current_user = <%= user_signed_in? ? current_user.id : -1 %></script>
<div id="content" class="container pt-3">
<% if notice %>
<div class="alert alert-success alert-dismissible fade show notice" role="alert">
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ en:
current_proposals: 'Proposals'
accept_proposal: 'Accept'
index:
portal_name: 'Connection Portal'
portal_name: 'Connections++'
description: 'A digital tool for organizing and arranging networks, relationships and human connections.'
greeting: 'We hope you enjoy using it!'
give_feedback: 'Give feedback!'
Expand Down
6 changes: 3 additions & 3 deletions spec/features/activity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
visit root_path
end

it 'can be added in a text area' do
xit 'can be added in a text area' do
expect(page).to have_field('activity-textarea')
end

it 'can be added on the dashboard' do
xit 'can be added on the dashboard' do
fill_in 'activity-textarea', with: 'This is an activity'
find('#add-activity-button').click
expect(user.activities.map(&:content)).to include('This is an activity')
end

it 'has a cleared text box after a successful submit' do
xit 'has a cleared text box after a successful submit' do
fill_in 'activity-textarea', with: 'This is an activity'
find('#add-activity-button').click
expect(page).to have_field('activity-textarea', text: '')
Expand Down
3 changes: 1 addition & 2 deletions spec/requests/home_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
sign_in user
get root_path
expect(response).to have_http_status(:success)
expect(response.body).to include(I18n.t('dashboard.last_activities'))
end
end

context 'when not signed in' do
it 'returns http success' do
get root_path
expect(response.body).not_to include(I18n.t('dashboard.last_activities'))
expect(response).to have_http_status(:success)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/views/home/dashboard.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
end

describe 'last activities' do
it 'shows the heading' do
xit 'shows the heading' do
expect(rendered).to have_text(I18n.t('dashboard.last_activities'))
end
end

describe 'current proposals' do
it 'shows the heading' do
xit 'shows the heading' do
expect(rendered).to have_text(I18n.t('dashboard.current_proposals'))
end
end
Expand Down