-
Notifications
You must be signed in to change notification settings - Fork 935
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
Show "reporting user" on "issues" screen #4990
Show "reporting user" on "issues" screen #4990
Conversation
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.
Although this is described as showing the "last three unique reporters" there isn't actually any ordering that I can see, and ordering on time is hard to combine with uniqification...
Currently the ignored issues page takes 10 seconds to load and the resolved issues won't load at all for me. If the queries are to be any heavier, it's going to get even worse. |
0a111b0
to
a8f29ca
Compare
@tomhughes Thanks for the review. I've updated according to your feedback. Tooltip is a good idea for giving more information, but I have a question about, if users get the information correctly and won't be confused, because when a user hovers on a profile link, tooltip will show all the reporters (current solution) and he might be confused if the link redirects him to the specific user or some list of users. If we add a tooltip only to the places with no link, user will have to hover either semicolons or ellipsis, which are hard to target because of their small size. |
@AntonKhorev If the issues page is already slow, we can temporarily archive this PR and reopen it after optimization. |
@AntonKhorev About the issues page loading time, I am interested, what is the average number of issues displayed, when the page is loaded. If the loading problem arises because of the great number of issues, we can add infinite scroll (load-on-scroll) functionality or pagination to resolve it. If either solution is okay, I'll create a separate PR for it. |
There's an acceptable number of open issues because they are being dealt with, but once that happens they become either resolved or ignored, those numbers keep growing. Total number of issues is currently at ~30000, that means 2000..20000 issues on ignored/resolved pages for moderator/administrator queues.
We can, if we want to trade it for another problem of making searches more difficult. See #3105 for a similar issue. |
Intermediate solution would be showing reporting users only on open issues pages. Or maybe on any page but only if the number of issues is below some threshold. |
@AntonKhorev What do you mean with making searches more difficult? From the user experience perspective, infinite scroll doesn't add any difficulties or additional clicks to see issues. If you mean searching with a browser built-in search functionality (because it needs all the issues to be rendered to work) and admins/moderators are using it, then we have to change or enhance our search so that browser built-in search wouldn't be needed. This way we will both optimize the page and make the user experience more website oriented. |
a8f29ca
to
7d67d4e
Compare
As #5057 is merged, this PR was updated to match pagination changes of the issues page. In terms of performance, on the local machine I have 1000 users and 1000 issues, and pagination time was increased only by 150-200ms (it should be similar increase in the real environment, as before for the #5057 I tried to match up timing of the local and real environments). All the Ruby variable initializations and calculations (from the previous solution) were moved from Also, as we are using Bootstrap Tooltips in other places,
Because of these limitations, it has some bugs when working with Turbo (tooltips are not closing, tooltips got frozen on the top-left side of the screen ...). |
I wouldn't try to do a comma-separated list
I'd write them each on a new line and add truncation
And if there's more than say 3, write something like
|
@AntonKhorev do you mean to make this kind of truncation in the tooltip? |
I mean let's not have tooltips at all. This is what a table cell contents may look like:
"and 2 more users" initially can be just a passive text, later it can bechanged to some js expansion or turbo streams rewrite. |
@AntonKhorev It will make |
Is that additional whitespace going to be a problem? |
Sorry for the late answer. I think it will be a problem in terms of UI and UX: |
Which blocks are "every"? Reporter user lists? Aren't lists regularly read top-to-bottom? |
@AntonKhorev I'll update this PR to have vertical list of |
Can't you don this already by looking at the link location that the browse shows? |
If there is no tooltip on the issues, which has more than 3 reporters, users won't be able to take a look at reporters full list without opening the issue page. |
For now they won't. But then we'll make it clickable to show the rest of the users. This should work better than a tooltip because it's usable with touch interfaces too. |
7d67d4e
to
0e69bdf
Compare
Are reporters sorted? Judging by #4990 (review) there was an attempt to show last three unique reporters, but now looks like it's not happening. If there's an issue that was resolved, it has But all of those considerations could be skipped (at least initially) if we sort reporters by their last reports. Unread reports always come chronologically after read reports, therefore last reporters will come from unread reports first. |
Sorting reporters by their last reports is a good idea. I'll do it and update PR accordingly. I think, after this PR is merged then, if needed, we can enhance "reporters" functionality by adding some filters to it. As |
d7eb8b6
to
eb7309c
Compare
PR was updated. Reporters are now sorted according to their last report creation datetime in descending order. Tests were also added to test sorting functionality. |
eb7309c
to
f223d67
Compare
test/system/issues_test.rb
Outdated
1.upto(5).each do |n| | ||
issue.reports << create(:report, :user => create(:user, :display_name => "Test Name #{n}")) | ||
end |
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.
1.upto(5).each do |n| | |
issue.reports << create(:report, :user => create(:user, :display_name => "Test Name #{n}")) | |
end | |
create_list(:report, 5, :issue => issue) |
because you're not checking if usernames match "Test Name #{n}"
.
And probably the same in the next test.
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.
Thanks for the suggestion. Both tests were changed to match smaller list creation you suggested.
f223d67
to
1a23bfa
Compare
Although it can still be optimized, let's start with this. |
The phrase "reporting user" as in the title of this PR makes more sense than "reporter user" that is actually used... |
This PR addresses "Show 'reporting user' on 'issues' screen" issue mentioned in the #2273
On the issues page, there was added a new column called "Reporter Users". It will show unique reporters of the item. If there are more than reporters for the given item than the size of the block can handle, ellipsis will be shown at the end of the line. Each of user display name will have a link to the user. Fixes #2273
Update:
Added fixed max-width for reporters' column. If the text can't be fitted, ellipsis will be shown. On hover, box shows all the reporters.
Screenshot: