Commit cfb3e60a authored by wortschi's avatar wortschi

Remove set_user_availability_status feature flag

- Removes the feature flag which
is already enabled by default
and adds a changelog entry.
parent 535217be
......@@ -45,7 +45,6 @@ function initStatusTriggers() {
defaultEmoji,
currentMessage,
currentAvailability,
canSetUserAvailability,
currentClearStatusAfter,
} = setStatusModalWrapperEl.dataset;
......@@ -54,7 +53,6 @@ function initStatusTriggers() {
defaultEmoji,
currentMessage,
currentAvailability,
canSetUserAvailability,
currentClearStatusAfter,
};
},
......@@ -64,7 +62,6 @@ function initStatusTriggers() {
defaultEmoji,
currentMessage,
currentAvailability,
canSetUserAvailability,
currentClearStatusAfter,
} = this;
......@@ -74,7 +71,6 @@ function initStatusTriggers() {
defaultEmoji,
currentMessage,
currentAvailability,
canSetUserAvailability,
currentClearStatusAfter,
},
});
......
......@@ -67,11 +67,6 @@ export default {
required: false,
default: '',
},
canSetUserAvailability: {
type: Boolean,
required: false,
default: false,
},
currentClearStatusAfter: {
type: String,
required: false,
......@@ -292,7 +287,7 @@ export default {
</button>
</span>
</div>
<div v-if="canSetUserAvailability" class="form-group">
<div class="form-group">
<div class="gl-display-flex">
<gl-form-checkbox
v-model="availability"
......
......@@ -162,7 +162,6 @@ module PageLayoutHelper
default_properties = {
current_emoji: '',
current_message: '',
can_set_user_availability: Feature.enabled?(:set_user_availability_status, user, default_enabled: :yaml),
default_emoji: UserStatus::DEFAULT_EMOJI
}
......
......@@ -70,10 +70,9 @@
prepend: emoji_button,
append: reset_message_button,
placeholder: s_("Profiles|What's your status?")
- if Feature.enabled?(:set_user_availability_status, @user, default_enabled: :yaml)
.checkbox-icon-inline-wrapper
= status_form.check_box :availability, { data: { testid: "user-availability-checkbox" }, label: s_("Profiles|Busy"), wrapper_class: 'gl-mr-0 gl-font-weight-bold' }, availability["busy"], availability["not_set"]
.gl-text-gray-600.gl-ml-5= s_('Profiles|"Busy" will be shown next to your name')
.checkbox-icon-inline-wrapper
= status_form.check_box :availability, { data: { testid: "user-availability-checkbox" }, label: s_("Profiles|Busy"), wrapper_class: 'gl-mr-0 gl-font-weight-bold' }, availability["busy"], availability["not_set"]
.gl-text-gray-600.gl-ml-5= s_('Profiles|"Busy" will be shown next to your name')
- if Feature.enabled?(:user_time_settings)
.col-lg-12
%hr
......
---
title: Add user availability status to status modal and settings
merge_request: 60351
author:
type: other
---
name: set_user_availability_status
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46844
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/281073
milestone: '13.6'
type: development
group: group::optimize
default_enabled: true
......@@ -135,9 +135,7 @@ If you select the **Busy** checkbox, remember to clear it when you become availa
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/259649) in GitLab 13.6.
> - It was [deployed behind a feature flag](../feature_flags.md), disabled by default.
> - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/281073) in GitLab 13.8.
> - It's enabled on GitLab.com.
> - It's not recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#disable-busy-status-feature).
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/329163) in GitLab 13.12.
To indicate to others that you are busy, you can set an indicator.
......@@ -173,23 +171,6 @@ To set the busy status indicator, either:
| --- | --- |
| ![Busy status - notes](img/busy_indicator_notes_v13_9.png) | ![Busy status - note header](img/busy_indicator_note_header_v13_9.png) |
### Disable busy status feature
The busy status feature is deployed behind a feature flag and is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md) can disable it for your instance from the [rails console](../../administration/feature_flags.md#start-the-gitlab-rails-console).
To disable it:
```ruby
Feature.disable(:set_user_availability_status)
```
To enable it:
```ruby
Feature.enable(:set_user_availability_status)
```
## Change the email displayed on your commits
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/21598) in GitLab 11.4.
......
......@@ -232,17 +232,6 @@ RSpec.describe 'User edit profile' do
expect(page.find('.issuable-assignees')).to have_content("#{user.name} (Busy)")
end
end
context 'with set_user_availability_status feature flag disabled' do
before do
stub_feature_flags(set_user_availability_status: false)
visit root_path(user)
end
it 'does not display the availability checkbox' do
expect(page).not_to have_css('[data-testid="user-availability-checkbox"]')
end
end
end
context 'user menu' do
......@@ -487,19 +476,6 @@ RSpec.describe 'User edit profile' do
expect(first_note).not_to have_css('.user-status-emoji')
end
end
context 'with set_user_availability_status feature flag disabled' do
before do
stub_feature_flags(set_user_availability_status: false)
visit root_path(user)
end
it 'does not display the availability checkbox' do
open_user_status_modal
expect(page).not_to have_css('[data-testid="user-availability-checkbox"]')
end
end
end
context 'User time preferences', :js do
......
......@@ -23,7 +23,6 @@ describe('SetStatusModalWrapper', () => {
currentEmoji: defaultEmoji,
currentMessage: defaultMessage,
defaultEmoji,
canSetUserAvailability: true,
};
const createComponent = (props = {}) => {
......@@ -278,16 +277,4 @@ describe('SetStatusModalWrapper', () => {
});
});
});
describe('with canSetUserAvailability=false', () => {
beforeEach(async () => {
mockEmoji = await initEmojiMock();
wrapper = createComponent({ canSetUserAvailability: false });
return initModal();
});
it('hides the set availability checkbox', () => {
expect(findAvailabilityCheckbox().exists()).toBe(false);
});
});
});
......@@ -232,7 +232,6 @@ RSpec.describe PageLayoutHelper do
is_expected.to eq({
current_emoji: '',
current_message: '',
can_set_user_availability: true,
default_emoji: UserStatus::DEFAULT_EMOJI
})
end
......@@ -251,7 +250,6 @@ RSpec.describe PageLayoutHelper do
current_availability: 'busy',
current_emoji: 'basketball',
current_message: 'Some message',
can_set_user_availability: true,
default_emoji: UserStatus::DEFAULT_EMOJI
})
end
......
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