Skip to content

Commit

Permalink
Merge pull request #10310 from OleksandrOrlov/wrap_sidebar_items
Browse files Browse the repository at this point in the history
Wrap sidebar links with span.nav-item-name
  • Loading branch information
saraycp authored Oct 15, 2020
2 parents 84d659d + d841d98 commit 75a5c61
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/api/app/views/webui/user/_edit_account.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Edit your account
- else
%li.nav-item
= link_to('#', data: { toggle: 'modal', target: '#edit-modal' }, class: 'nav-link') do
= link_to('#', data: { toggle: 'modal', target: '#edit-modal' }, class: 'nav-link', title: 'Edit Your Account') do
%i.fas.fa-lg.mr-2.fa-user-edit
Edit your account
%span.nav-item-name Edit Your Account
- elsif account_edit_link.present?
= link_to(account_edit_link, class: 'd-block') do
%i.fas.fa-user-edit
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/webui/user/_index_actions.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- content_for :actions do
%li.nav-item
= link_to('#', data: { toggle: 'modal', target: '#password-modal' }, class: 'nav-link') do
= link_to('#', data: { toggle: 'modal', target: '#password-modal' }, class: 'nav-link', title: 'Change Your Password') do
%i.fas.fa-lg.mr-2.fa-exchange-alt
Change your password
%span.nav-item-name Change Your Password
8 changes: 4 additions & 4 deletions src/api/app/views/webui/user/_info.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@
- if feature_enabled?(:responsive_ux)
- content_for :actions do
%li.nav-item
= link_to(my_subscriptions_path, class: 'nav-link') do
= link_to(my_subscriptions_path, class: 'nav-link', title: 'Change Your Notifications') do
%i.fas.fa-lg.mr-2.fa-bell
Change your notifications
%span.nav-item-name Change Your Notifications
- else
= link_to(my_subscriptions_path, class: 'd-block') do
%i.fas.fa-bell
Change your notifications
Change Your Notifications
- if user.rss_token
= link_to(user_rss_notifications_path(token: user.rss_token.string, format: 'rss'),
title: 'RSS Feed for Notifications', class: 'd-block') do
%i.fas.fa-rss-square
RSS for notifications
RSS for Notifications

:javascript
switchBeta();
12 changes: 6 additions & 6 deletions src/api/spec/features/beta/webui/users/user_home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
expect(page).to have_css('#home-realname', text: 'Jim Knopf')
expect(page).not_to have_css("a[href='mailto:jim.knopf@puppenkiste.com']", text: 'jim.knopf@puppenkiste.com')

expect(page).not_to have_text('Edit your account')
expect(page).not_to have_text('Change your password')
expect(page).not_to have_text('Edit Your account')
expect(page).not_to have_text('Change Your password')

expect(page).to have_link('Involved Packages')
expect(page).to have_link('Involved Projects')
Expand All @@ -37,8 +37,8 @@
expect(page).to have_css("a[href='mailto:jim.knopf@puppenkiste.com']", text: 'jim.knopf@puppenkiste.com')

within('#bottom-navigation-area') { click_link('Actions') } if mobile?
expect(page).to have_text('Edit your account')
expect(page).to have_text('Change your password')
expect(page).to have_text('Edit Your Account')
expect(page).to have_text('Change Your Password')

expect(page).to have_link('Involved Packages')
expect(page).to have_link('Involved Projects')
Expand All @@ -61,9 +61,9 @@
it 'edit account information' do
if mobile?
within('#bottom-navigation-area') { click_link('Actions') }
within('#bottom-navigation-area') { click_link('Edit your account') }
within('#bottom-navigation-area') { click_link('Edit Your Account') }
else
click_link('Edit your account')
click_link('Edit Your Account')
end

fill_in('user_realname', with: 'John Doe')
Expand Down

0 comments on commit 75a5c61

Please sign in to comment.