Commit 1fdcbf71 authored by peterhegman's avatar peterhegman

Change "Pending" tab to "Invited"

To improve UX
parent 41a68855
......@@ -2,7 +2,7 @@
- can_manage_members = can?(current_user, :admin_group_member, @group)
- show_invited_members = can_manage_members && @invited_members.exists?
- show_access_requests = can_manage_members && @requesters.exists?
- pending_active = params[:search_invited].present? || params[:invited_members_page].present?
- invited_active = params[:search_invited].present? || params[:invited_members_page].present?
- form_item_label_css_class = 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center'
......@@ -27,7 +27,7 @@
%ul.nav-links.mobile-separator.nav.nav-tabs
%li.nav-item
= link_to "#tab-members", class: ["nav-link", ("active" unless pending_active)] , 'data-toggle': 'tab' do
= link_to "#tab-members", class: ["nav-link", ("active" unless invited_active)] , 'data-toggle': 'tab' do
%span
= _("Members")
%span.badge.badge-pill= @members.total_count
......@@ -39,9 +39,9 @@
%span.badge.badge-pill= @group.shared_with_group_links.count
- if show_invited_members
%li.nav-item
= link_to "#tab-pending-members", class: ["nav-link", ("active" if pending_active)], 'data-toggle': 'tab' do
= link_to "#tab-invited-members", class: ["nav-link", ("active" if invited_active)], 'data-toggle': 'tab' do
%span
= _("Pending")
= _("Invited")
%span.badge.badge-pill= @invited_members.total_count
- if show_access_requests
%li.nav-item
......@@ -50,7 +50,7 @@
= _("Access requests")
%span.badge.badge-pill= @requesters.count
.tab-content
#tab-members.tab-pane{ class: ("active" unless pending_active) }
#tab-members.tab-pane{ class: ("active" unless invited_active) }
.card.card-without-border
= render 'groups/group_members/tab_pane/header' do
= render 'groups/group_members/tab_pane/title' do
......@@ -79,11 +79,11 @@
- @group.shared_with_group_links.each do |group_link|
= render 'shared/members/group', group_link: group_link, can_admin_member: can_manage_members, group_link_path: group_group_link_path(@group, group_link)
- if show_invited_members
#tab-pending-members.tab-pane{ class: ("active" if pending_active) }
#tab-invited-members.tab-pane{ class: ("active" if invited_active) }
.card.card-without-border
= render 'groups/group_members/tab_pane/header' do
= render 'groups/group_members/tab_pane/title' do
= html_escape(_("Members with pending access to %{strong_start}%{group_name}%{strong_end}")) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
= html_escape(_("Members invited to %{strong_start}%{group_name}%{strong_end}")) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
= form_tag group_group_members_path(@group), method: :get, class: 'user-search-form', data: { testid: 'user-search-form' } do
= render 'shared/members/search_field', name: 'search_invited'
%ul.content-list.members-list
......
doc/user/group/img/add_new_members.png

36.2 KB | W: | H:

doc/user/group/img/add_new_members.png

77.5 KB | W: | H:

doc/user/group/img/add_new_members.png
doc/user/group/img/add_new_members.png
doc/user/group/img/add_new_members.png
doc/user/group/img/add_new_members.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -13225,6 +13225,9 @@ msgstr ""
msgid "Invite teammates (optional)"
msgstr ""
msgid "Invited"
msgstr ""
msgid "Invited users will be added with developer level permissions. You can always change this later."
msgstr ""
......@@ -14831,6 +14834,9 @@ msgstr ""
msgid "Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}"
msgstr ""
msgid "Members invited to %{strong_start}%{group_name}%{strong_end}"
msgstr ""
msgid "Members of %{strong_open}%{project_name}%{strong_close}"
msgstr ""
......@@ -14840,9 +14846,6 @@ msgstr ""
msgid "Members with access to %{strong_start}%{group_name}%{strong_end}"
msgstr ""
msgid "Members with pending access to %{strong_start}%{group_name}%{strong_end}"
msgstr ""
msgid "Memory Usage"
msgstr ""
......
......@@ -101,7 +101,7 @@ RSpec.describe 'Groups > Members > Manage members' do
add_user('test@example.com', 'Reporter')
click_link('Pending')
click_link('Invited')
page.within('.content-list.members-list') do
expect(page).to have_content('test@example.com')
......
......@@ -11,9 +11,9 @@ RSpec.describe 'Groups > Members > Tabs' do
end
end
shared_examples 'active "Pending" tab' do
it 'displays "Pending" tab' do
expect(page).to have_selector('.nav-link.active', text: 'Pending')
shared_examples 'active "Invited" tab' do
it 'displays "Invited" tab' do
expect(page).to have_selector('.nav-link.active', text: 'Invited')
end
end
......@@ -35,7 +35,7 @@ RSpec.describe 'Groups > Members > Tabs' do
where(:tab, :count) do
'Members' | 3
'Pending' | 2
'Invited' | 2
'Groups' | 2
'Access requests' | 2
end
......@@ -56,11 +56,11 @@ RSpec.describe 'Groups > Members > Tabs' do
it_behaves_like 'active "Members" tab'
end
context 'when searching "Pending"', :js do
context 'when searching "Invited"', :js do
before do
visit group_group_members_path(group)
click_link 'Pending'
click_link 'Invited'
page.within '[data-testid="user-search-form"]' do
fill_in 'search_invited', with: 'email'
......@@ -68,7 +68,7 @@ RSpec.describe 'Groups > Members > Tabs' do
end
end
it_behaves_like 'active "Pending" tab'
it_behaves_like 'active "Invited" tab'
context 'and then searching "Members"' do
before do
......@@ -84,18 +84,18 @@ RSpec.describe 'Groups > Members > Tabs' do
end
end
context 'when using "Pending" pagination', :js do
context 'when using "Invited" pagination', :js do
before do
visit group_group_members_path(group)
click_link 'Pending'
click_link 'Invited'
page.within '.pagination' do
click_link '2'
end
end
it_behaves_like 'active "Pending" tab'
it_behaves_like 'active "Invited" tab'
context 'and then using "Members" pagination' do
before do
......
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