Commit 0e9e1d42 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'add-followed-user-activity-to-dashboard' into 'master'

Add 'Followed User Activity' as dashboard user choices

See merge request gitlab-org/gitlab!55165
parents 271ef1f5 777a7593
......@@ -46,6 +46,8 @@ class RootController < Dashboard::ProjectsController
redirect_to(activity_dashboard_path)
when 'starred_project_activity'
redirect_to(activity_dashboard_path(filter: 'starred'))
when 'followed_user_activity'
redirect_to(activity_dashboard_path(filter: 'followed'))
when 'groups'
redirect_to(dashboard_groups_path)
when 'todos'
......
......@@ -29,6 +29,7 @@ module PreferencesHelper
stars: _("Starred Projects"),
project_activity: _("Your Projects' Activity"),
starred_project_activity: _("Starred Projects' Activity"),
followed_user_activity: _("Followed Users' Activity"),
groups: _("Your Groups"),
todos: _("Your To-Do List"),
issues: _("Assigned Issues"),
......
......@@ -272,7 +272,7 @@ class User < ApplicationRecord
enum layout: { fixed: 0, fluid: 1 }
# 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
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
overwhelming. Changing this setting allows you to redefine your default
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)
- Starred projects
- Your projects' activity
- Starred projects' activity
- Followed Users' Activity
- Your groups
- Your [To-Do List](../todos.md)
- Assigned Issues
......
......@@ -13201,6 +13201,9 @@ msgstr ""
msgid "Follow"
msgstr ""
msgid "Followed Users' Activity"
msgstr ""
msgid "Followed users"
msgstr ""
......
......@@ -68,6 +68,18 @@ RSpec.describe RootController do
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
before do
user.dashboard = 'groups'
......
......@@ -29,6 +29,7 @@ RSpec.describe PreferencesHelper do
['Starred Projects', 'stars'],
["Your Projects' Activity", 'project_activity'],
["Starred Projects' Activity", 'starred_project_activity'],
["Followed Users' Activity", 'followed_user_activity'],
["Your Groups", 'groups'],
["Your To-Do List", 'todos'],
["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