Commit 1fdcbf71 authored by peterhegman's avatar peterhegman

Change "Pending" tab to "Invited"

To improve UX
parent 41a68855
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- can_manage_members = can?(current_user, :admin_group_member, @group) - can_manage_members = can?(current_user, :admin_group_member, @group)
- show_invited_members = can_manage_members && @invited_members.exists? - show_invited_members = can_manage_members && @invited_members.exists?
- show_access_requests = can_manage_members && @requesters.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' - form_item_label_css_class = 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center'
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
%ul.nav-links.mobile-separator.nav.nav-tabs %ul.nav-links.mobile-separator.nav.nav-tabs
%li.nav-item %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 %span
= _("Members") = _("Members")
%span.badge.badge-pill= @members.total_count %span.badge.badge-pill= @members.total_count
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
%span.badge.badge-pill= @group.shared_with_group_links.count %span.badge.badge-pill= @group.shared_with_group_links.count
- if show_invited_members - if show_invited_members
%li.nav-item %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 %span
= _("Pending") = _("Invited")
%span.badge.badge-pill= @invited_members.total_count %span.badge.badge-pill= @invited_members.total_count
- if show_access_requests - if show_access_requests
%li.nav-item %li.nav-item
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
= _("Access requests") = _("Access requests")
%span.badge.badge-pill= @requesters.count %span.badge.badge-pill= @requesters.count
.tab-content .tab-content
#tab-members.tab-pane{ class: ("active" unless pending_active) } #tab-members.tab-pane{ class: ("active" unless invited_active) }
.card.card-without-border .card.card-without-border
= render 'groups/group_members/tab_pane/header' do = render 'groups/group_members/tab_pane/header' do
= render 'groups/group_members/tab_pane/title' do = render 'groups/group_members/tab_pane/title' do
...@@ -79,11 +79,11 @@ ...@@ -79,11 +79,11 @@
- @group.shared_with_group_links.each do |group_link| - @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) = 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 - 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 .card.card-without-border
= render 'groups/group_members/tab_pane/header' do = render 'groups/group_members/tab_pane/header' do
= render 'groups/group_members/tab_pane/title' 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 = 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' = render 'shared/members/search_field', name: 'search_invited'
%ul.content-list.members-list %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 "" ...@@ -13225,6 +13225,9 @@ msgstr ""
msgid "Invite teammates (optional)" msgid "Invite teammates (optional)"
msgstr "" msgstr ""
msgid "Invited"
msgstr ""
msgid "Invited users will be added with developer level permissions. You can always change this later." msgid "Invited users will be added with developer level permissions. You can always change this later."
msgstr "" msgstr ""
...@@ -14831,6 +14834,9 @@ msgstr "" ...@@ -14831,6 +14834,9 @@ msgstr ""
msgid "Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}" msgid "Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}"
msgstr "" msgstr ""
msgid "Members invited to %{strong_start}%{group_name}%{strong_end}"
msgstr ""
msgid "Members of %{strong_open}%{project_name}%{strong_close}" msgid "Members of %{strong_open}%{project_name}%{strong_close}"
msgstr "" msgstr ""
...@@ -14840,9 +14846,6 @@ msgstr "" ...@@ -14840,9 +14846,6 @@ msgstr ""
msgid "Members with access to %{strong_start}%{group_name}%{strong_end}" msgid "Members with access to %{strong_start}%{group_name}%{strong_end}"
msgstr "" msgstr ""
msgid "Members with pending access to %{strong_start}%{group_name}%{strong_end}"
msgstr ""
msgid "Memory Usage" msgid "Memory Usage"
msgstr "" msgstr ""
......
...@@ -101,7 +101,7 @@ RSpec.describe 'Groups > Members > Manage members' do ...@@ -101,7 +101,7 @@ RSpec.describe 'Groups > Members > Manage members' do
add_user('test@example.com', 'Reporter') add_user('test@example.com', 'Reporter')
click_link('Pending') click_link('Invited')
page.within('.content-list.members-list') do page.within('.content-list.members-list') do
expect(page).to have_content('test@example.com') expect(page).to have_content('test@example.com')
......
...@@ -11,9 +11,9 @@ RSpec.describe 'Groups > Members > Tabs' do ...@@ -11,9 +11,9 @@ RSpec.describe 'Groups > Members > Tabs' do
end end
end end
shared_examples 'active "Pending" tab' do shared_examples 'active "Invited" tab' do
it 'displays "Pending" tab' do it 'displays "Invited" tab' do
expect(page).to have_selector('.nav-link.active', text: 'Pending') expect(page).to have_selector('.nav-link.active', text: 'Invited')
end end
end end
...@@ -35,7 +35,7 @@ RSpec.describe 'Groups > Members > Tabs' do ...@@ -35,7 +35,7 @@ RSpec.describe 'Groups > Members > Tabs' do
where(:tab, :count) do where(:tab, :count) do
'Members' | 3 'Members' | 3
'Pending' | 2 'Invited' | 2
'Groups' | 2 'Groups' | 2
'Access requests' | 2 'Access requests' | 2
end end
...@@ -56,11 +56,11 @@ RSpec.describe 'Groups > Members > Tabs' do ...@@ -56,11 +56,11 @@ RSpec.describe 'Groups > Members > Tabs' do
it_behaves_like 'active "Members" tab' it_behaves_like 'active "Members" tab'
end end
context 'when searching "Pending"', :js do context 'when searching "Invited"', :js do
before do before do
visit group_group_members_path(group) visit group_group_members_path(group)
click_link 'Pending' click_link 'Invited'
page.within '[data-testid="user-search-form"]' do page.within '[data-testid="user-search-form"]' do
fill_in 'search_invited', with: 'email' fill_in 'search_invited', with: 'email'
...@@ -68,7 +68,7 @@ RSpec.describe 'Groups > Members > Tabs' do ...@@ -68,7 +68,7 @@ RSpec.describe 'Groups > Members > Tabs' do
end end
end end
it_behaves_like 'active "Pending" tab' it_behaves_like 'active "Invited" tab'
context 'and then searching "Members"' do context 'and then searching "Members"' do
before do before do
...@@ -84,18 +84,18 @@ RSpec.describe 'Groups > Members > Tabs' do ...@@ -84,18 +84,18 @@ RSpec.describe 'Groups > Members > Tabs' do
end end
end end
context 'when using "Pending" pagination', :js do context 'when using "Invited" pagination', :js do
before do before do
visit group_group_members_path(group) visit group_group_members_path(group)
click_link 'Pending' click_link 'Invited'
page.within '.pagination' do page.within '.pagination' do
click_link '2' click_link '2'
end end
end end
it_behaves_like 'active "Pending" tab' it_behaves_like 'active "Invited" tab'
context 'and then using "Members" pagination' do context 'and then using "Members" pagination' do
before 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