-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Move reports views to separate pages #5686
Conversation
- Sending message ID to frontend - Deleting Message - Use pusher to delete message realtime
- User can delete or edit their own messages
Message id was not sent to receiver by pusher
…dit_messages Feature/ability to delete and edit messages
…open messages and increasing message number count
…essage is notified to user or not
…ature/ability_to_mention_anyone_in_chat
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 this can be split a bit further in separate actions and templates.
ransack(params[:q]) | ||
@feedback_messages = @q.result.page(params[:page] || 1).per(5) | ||
@view = params[:view] | ||
if @view == "new-articles" |
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.
if we split these view ==
in different routes we gain an easier code organization, so instead of /internals/reports?view=name
it could be /internal/reports/name
and each of the view has its own action method
<% if @view == "new-articles" %> | ||
<%= render "new_articles" %> | ||
<% elsif @view == "suspicious-users" %> | ||
<%= render "suspicious_users" %> | ||
<% else %> | ||
<%= render "reports" if @view.blank? %> | ||
<% 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.
these could just be rendered by the controller.
/internal/reports/new-articles
/internal/reports/suspicious-users
/internal/reports/feedback-messages
or just /internal/reports
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.
Looks like there are some commits that shouldn't be in here. Can we fix this either via rebase or cherry-picking?
Since this hasn't been active for a while and there are some conflicts I am going to close it. If we still want this feature lets resolve the conflicts, get the specs to run green, then reopen the PR. |
What type of PR is this? (check all applicable)
Description
This moves the sections of
internal/reports
into their own pages. I think the performance gains we get will make it smoother for admins to sort, discover, and generally make them check this part of the site more often due to speed of fewer (sometimes slow) queries.