-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Remove limit from axios call that retrieves groups #24611
Remove limit from axios call that retrieves groups #24611
Conversation
/compile amend / |
Signed-off-by: Mephisto <[email protected]> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
b41b78c
to
3b95d40
Compare
Will this PR make it? |
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 is a bad idea and will bring down servers with a lot of groups.
Why can't you type ahead to search?
This is not the Issue. Please read it. The Comboboxes will stay empty for existing workflows, if the groups are not within the first 20. |
Then this needs fixing. Loading potentially 2k or more groups which breaks the UI completely is not the option |
Limiting breaks the UI as well. How could this be fixed? It could be limited if the actually selected group in a workflowcondition would be guaranteed to be part of the result from the axios call. This would guarantee that the combo wouldn't be empty.. Is having 2k groups really a realistic case? Seems to be rather theoretical to me. |
There are several customer running with far more than 2k groups ;) |
Showing not all groups is expected here, since as already mentioned this would be quite an issue with larger amount of groups. However I do not see any issue with the original implementation as you can still get to groups that are not displayed by searching for them. |
It's not confusing if one add a group to a workflow and after a page reload the group is not shown anymore? 🤔 |
Ah, then I misunderstood the issue. In that case we most likely fail because we don't have a group match (with a displayname) in
I'm not sure how to best solve this other than doing a request for each currently set value yet, but that might of course also cause a high amount of requests for each rule that has a different group set. |
It actually seems to be the case already, so maybe @lephisto can clarify a bit on the original issue. |
you have two ways to fix this
=> so it will retrieve all groups ONLY at initialization
|
No this is not the case. The current behaviour is, that if you load an existing workflow and there is one group assignment which isn't coincidentally in the first 20 results of the result-limited query, the Dropdown just stays empty, which is confusing. This is why i formulated the PR to not limit it at all, but I get that it might result in an uncool behaviour if ppl use groups excessively.. As proposed earlier, one idea might be to pass the currently assigned groups to the axios call, to guarantee that they're part of the resultset thus avoiding the confusion. But this exceeds my Nextcloud Coding style awareness to not make it totally ugly. :) |
Closing again. This is not the right way. The required data needs to be loaded manually or with initial state on the settings module. But removing the limit and returning all groups is not an option. |
Fixes #24547
Signed-off-by: Mephisto [email protected]