-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
FEAT(client): Message Thresholding #4808
Conversation
Also, I haven't tested this functionality in any way, other than building & opening mumble to make sure the UI looked somewhat correct.
|
You can use something like Botamusique to create a bunch of bots and let them join a locally hosted server
If you set the threshold low enough and @Natenom allows it, you could use his server (I'll not give out any server details before he agreed though)
As it stands we barely have any tests in the first place, so I don't see an easy way of adding test cases for this feature. We want to change that eventually but for now: no you don't have to |
I think it'd look better if the threshold column was moved one position to the left so that the |
Can you please include a description of the (overall) changes and context in the PR description? This may be what is also written in an individual commit message. It should be enough context to get an overview for unfamiliar readers, and will land in the merge commit which again should be easy to digest to know what changed and why. |
Yes, I'm going to clean up the commits after I'm done with my changes. It's just auto-pushing from my fork :/ |
@Krzmbrzl |
Prune the build directory. |
And also try waiting. Start the build and then go have lunch or something. On Windows it can take forever for this to work out. |
@davidebeatrici, sorry, not sure how to prune the build directory. Is pruning referring to modifying one of the |
Ok... I've built it, the threshold settings save, and it works (but not for server connect and disconnect). |
Try removing the out and src folder, and check them out again. This should remove any intermediate and broken files. Then generate and make steps again. |
I'd like to see this polished a bit, but if I don't submit this PR now, I'm never going to finish it. I've checked the functionality for 2 different message types, but not all of them.
|
It's definitely not possible for the
I think that'd be quite important to do in order to clarify the context. So changing the layout is fine
Yes
It is rather cryptic, yes. I am having a hard time finding a better column header though. Maybe |
Note also that you have merge conflicts. In order to resolve them, run |
29e488d
to
57ffe53
Compare
Holy guacamole, I think I'm finally done.
|
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 think "Limit" is probably the better name for this feature.
a) It seems to be more easily understandable
b) It's shorter and thus the column header doesn't require as much space
In that spirit, I think you should rename all variables, setting keys and all UI strings that I might have overlooked to use "limit" instead of "threshold". Unless you disagree with that choice of course ☝️
src/mumble/Log.cpp
Outdated
twi->setWhatsThis(ColStaticSound, tr("Click here to toggle sound notification for %1 events.<br />If checked, " | ||
"Mumble uses a sound file predefined by you to indicate %1 events. Sound " | ||
"files and Text-To-Speech cannot be used at the same time.") | ||
.arg(messageName)); | ||
twi->setWhatsThis(ColStaticSoundPath, | ||
tr("Path to sound file used for sound notifications in the case of %1 events.<br />Single " | ||
tr("Path to sound file used for sound notifications in the case of %1 events.<br />Single " |
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.
Unrelated change
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.
You guys don't follow the "boy scout" rule? 😛
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.
It depends. Fixing this is fine, but it should be separated from the main changes. So if you wrap this up in its own FORMAT
commit, then that'd be fine :)
42d35b7
to
aad0f6b
Compare
src/mumble/Log.cpp
Outdated
@@ -223,6 +240,9 @@ void LogConfig::load(const Settings &r) { | |||
|
|||
#endif | |||
qcbWhisperFriends->setChecked(r.bWhisperFriends); | |||
qcbMessageLimit->setChecked(r.bMessageLimit); | |||
qsbMessageLimitUsers->setDisabled(!r.bMessageLimit); |
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.
This should resolve the uninitialized box issue.
From the column title “Threshold” I would expect it to be a message count or rate threshold, not a user count threshold. What do you think about qualifying it to “User Threshold” or some other terminology, like “User Limit” or “Max Users”? There also seems to be no connection between the column and the setting below. I’m not sure if they are supposed to be connected or alternatives, but either way if they represent the same functionality they should use the same terminology. |
Oh sorry, I thought I already changed that column header to be "Limit". Let me look again. |
Yep, just needed to change the screenshot. |
Yep that is a good point. We should probably simply have the checkboxes in the column and below only have the spin box for setting the user count at which limiting starts 🤔 |
That should be easy enough. |
Ok @Krzmbrzl, mind giving it another look? |
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.
Furthermore I think the menu entry for setting the user threshold for the limiting feature should be a simple form. Something like
Notification limit threshold: <spinBox> users
Also sorry for the delay. I didn't get to review this earlier.
Ok, @Krzmbrzl, I think we're good now. Sorry for the delay. Got a new job and have limited time to work on this issue. |
Ok @Krzmbrzl, I've got 2 days to finish this thing. Any chance you could take a look at it some time today? |
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.
The changes LGTM.
The only thing I notices was that when you select the Limit option for all messages, all checkboxes are checked as epxteced. However unchecking a single checkbox for a particular message then causes all boxes to go unnchecked again.
This is a general problem of that settings page though and as such unrelated to your changes. Thus that is fine :)
I rebased your PR against the latest master branch and also added the missing translation commit.
I assume you have tested these changes to work as expected?
1199969
to
4f49edc
Compare
As requested in mumble-voip#2556, this commit implements the ability to turn off notifications when the server is hosting a number of clients defined by the user. Implements mumble-voip#2556
Thank you very much for your contribution 👍 |
You're welcome! Glad to have been able to help. Hoping to make some time to do some documentation PRs some time in the near future. |
Checks
This PR adds a new column named "Threshold" to the "Messages" settings tab to allow users to turn off message notifications when the server is above a certain number of users: