-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Option to enable/disable auto away and configure timer #8029
Conversation
Adds "Enable Auto Away" and "Idle Time Limit" field to account settings. Also adds internationalization to Enable Auto Away. Idle Time Limit internationalization strings still missing. Also adds a Idle Time Limit to RocketChat default settings.
Adds enableAutoAway and idleTimeLimit to the account preferences, and configures the startup.js to these settings as well..
@@ -568,6 +568,8 @@ | |||
"Enable_Svg_Favicon": "Enable SVG favicon", | |||
"Enable_two-factor_authentication": "Enable two-factor authentication", | |||
"Enabled": "Enabled", | |||
"Enable_Auto_Away": "Enable Auto Away", | |||
"Enable_Svg_Favicon": "Enable SVG favicon", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this string addition correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the "Enable Svg Favicon" came from a merge made to resolve some conflicts. I may need to look at this PR again now :/
tests/pageobjects/side-nav.page.js
Outdated
@@ -39,6 +39,10 @@ class SideNav extends Page { | |||
get avatar() { return browser.element('[href="/changeavatar"]'); } | |||
get preferencesClose() { return browser.element('.sidebar-flex__close-button[data-action="close"]'); } | |||
|
|||
get accountStatusBullet() { return browser.element('.sidebar__account-status-bullet'); } | |||
get accountStatusBulletOnline() { return browser.element('.sidebar__account-status-bullet--online'); } | |||
get accountStatusBulletAway() { return browser.element('.sidebar__account-status-bullet--away'); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this was meant to be used in e2e tests, but I actually saw that there already were some tests for this functionality. I should have not commited this, I'm removing it.
Hey, sorry, I've been busy with work. Today I'll review this PR and update it accordingly, as well as fix the broken tests |
@armand1m It's awesome to know that you are working on it again. Let me know if you can fix that things soon, I'm merging PRs to ship a new release candidate tomorrow and I'd love to include your PR. |
@rodrigok nice, I'll give it some attention now so we can close this issue. Expect to have this PR prepared today. |
@rodrigok Got the tests passing 😄 I've cleaned the dead code that I've left in the first version. I've also fixed some other tests mistakes. Here is a GIF demonstrating the feature. |
Hope to see it released tomorrow 😄 |
data.roomCounterSidebar = $('#roomCounterSidebar').find('input:checked').val(); | ||
data.messageCounterSidebar = $('#messageCounterSidebar').find('input:checked').val(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is that item? I think it's old code, was replaced by roomCounterSidebar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must have been placed in the last merge conflict I needed to solve. Sorry about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, it was fixed
Ok, guess it can be merged 😄 |
@RocketChat/core
Closes #736
This PR adds two new options to the Account Preferences, where the user can:
This PR also fixes a bug I've found in the
checked
template helper of the account settings package. When values where persisted as false values, but their default ones wheretrue
values, thechecked
helper would return always the default value since the way it was accessing the nested properties and verifying if they exists where the same as searching for its value.