Commit 44f8742f authored by Benj Fassbind's avatar Benj Fassbind

Add 'Followed User Activity' as dashboard user choices

parent 411e8901
...@@ -46,6 +46,8 @@ class RootController < Dashboard::ProjectsController ...@@ -46,6 +46,8 @@ class RootController < Dashboard::ProjectsController
redirect_to(activity_dashboard_path) redirect_to(activity_dashboard_path)
when 'starred_project_activity' when 'starred_project_activity'
redirect_to(activity_dashboard_path(filter: 'starred')) redirect_to(activity_dashboard_path(filter: 'starred'))
when 'followed_user_activity'
redirect_to(activity_dashboard_path(filter: 'followed'))
when 'groups' when 'groups'
redirect_to(dashboard_groups_path) redirect_to(dashboard_groups_path)
when 'todos' when 'todos'
......
...@@ -29,6 +29,7 @@ module PreferencesHelper ...@@ -29,6 +29,7 @@ module PreferencesHelper
stars: _("Starred Projects"), stars: _("Starred Projects"),
project_activity: _("Your Projects' Activity"), project_activity: _("Your Projects' Activity"),
starred_project_activity: _("Starred Projects' Activity"), starred_project_activity: _("Starred Projects' Activity"),
followed_user_activity: _("Followed Users' Activity"),
groups: _("Your Groups"), groups: _("Your Groups"),
todos: _("Your To-Do List"), todos: _("Your To-Do List"),
issues: _("Assigned Issues"), issues: _("Assigned Issues"),
......
...@@ -272,7 +272,7 @@ class User < ApplicationRecord ...@@ -272,7 +272,7 @@ class User < ApplicationRecord
enum layout: { fixed: 0, fluid: 1 } enum layout: { fixed: 0, fluid: 1 }
# User's Dashboard preference # User's Dashboard preference
enum dashboard: { projects: 0, stars: 1, project_activity: 2, starred_project_activity: 3, groups: 4, todos: 5, issues: 6, merge_requests: 7, operations: 8 } enum dashboard: { projects: 0, stars: 1, project_activity: 2, starred_project_activity: 3, groups: 4, todos: 5, issues: 6, merge_requests: 7, operations: 8, followed_user_activity: 9 }
# User's Project preference # User's Project preference
enum project_view: { readme: 0, activity: 1, files: 2 } enum project_view: { readme: 0, activity: 1, files: 2 }
......
---
title: "Add 'Followed User Activity' as dashboard user choices"
merge_request: 55165
author: Benj Fassbind @randombenj
type: added
...@@ -108,12 +108,13 @@ select few, the amount of activity on the default Dashboard page can be ...@@ -108,12 +108,13 @@ select few, the amount of activity on the default Dashboard page can be
overwhelming. Changing this setting allows you to redefine your default overwhelming. Changing this setting allows you to redefine your default
dashboard. dashboard.
You have 8 options here that you can use for your default dashboard view: You can include the following options for your default dashboard view:
- Your projects (default) - Your projects (default)
- Starred projects - Starred projects
- Your projects' activity - Your projects' activity
- Starred projects' activity - Starred projects' activity
- Followed User' Activity
- Your groups - Your groups
- Your [To-Do List](../todos.md) - Your [To-Do List](../todos.md)
- Assigned Issues - Assigned Issues
......
...@@ -13176,6 +13176,9 @@ msgstr "" ...@@ -13176,6 +13176,9 @@ msgstr ""
msgid "Follow" msgid "Follow"
msgstr "" msgstr ""
msgid "Followed Users' Activity"
msgstr ""
msgid "Followed users" msgid "Followed users"
msgstr "" msgstr ""
......
...@@ -68,6 +68,18 @@ RSpec.describe RootController do ...@@ -68,6 +68,18 @@ RSpec.describe RootController do
end end
end end
context 'who has customized their dashboard setting for followed user activities' do
before do
user.dashboard = 'followed_user_activity'
end
it 'redirects to the activity list' do
get :index
expect(response).to redirect_to activity_dashboard_path(filter: 'followed')
end
end
context 'who has customized their dashboard setting for groups' do context 'who has customized their dashboard setting for groups' do
before do before do
user.dashboard = 'groups' user.dashboard = 'groups'
......
...@@ -29,6 +29,7 @@ RSpec.describe PreferencesHelper do ...@@ -29,6 +29,7 @@ RSpec.describe PreferencesHelper do
['Starred Projects', 'stars'], ['Starred Projects', 'stars'],
["Your Projects' Activity", 'project_activity'], ["Your Projects' Activity", 'project_activity'],
["Starred Projects' Activity", 'starred_project_activity'], ["Starred Projects' Activity", 'starred_project_activity'],
["Followed Users' Activity", 'followed_user_activity'],
["Your Groups", 'groups'], ["Your Groups", 'groups'],
["Your To-Do List", 'todos'], ["Your To-Do List", 'todos'],
["Assigned Issues", 'issues'], ["Assigned Issues", 'issues'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment