Omit query params for discussions.json when loading issuable with note anchor
What does this MR do and why?
When visiting issuables with a note anchor, we omit the notes filter query params if the user's current filter is already set to "Show all activity".
This filter is a no-op and removing it allows us to reuse the discussions.js request made by startup JS.
How to set up and validate locally
-
Visit an issue / MR / Epic with a note anchor. (You can copy the link from a note)
-
Notice that there will be 2 requests to discussions.json. One without params (made by startup JS), and one with
notes_filter=0&persist_filter=false
.With this MR, there will only be one request.
Note: This only applies if the current user has the filter set to the default. If the user's filter is set to "comments only" / "history only", we still make 2 requests. That is an uncommon case so I think that's fine for now.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.