Repository navigation
Disable quick-mention on reviews without a comment - #5117
Merged
Merged
Conversation
kidonng
commented
Nov 29, 2021
| ); | ||
|
|
||
| const timelineItem = avatar.closest('.js-timeline-item')!; | ||
| if (timelineItem && !timelineItem.querySelector('.timeline-comment')) { |
Member
Author
There was a problem hiding this comment.
timelineItem doesn't exist for the first "comment" (i.e. author post)
Member
|
I'd just exclude reviews honestly 😅 like in It's weird that this changes the spacing |
Member
Author
|
Yeah that makes sense. |
quick-mention items without a commentquick-mention on reviews without a comment
fregante
reviewed
Dec 3, 2021
fregante
reviewed
Dec 3, 2021
Member
Author
Member
Member
Author
Because you don't have write access and thus that info line. |
fregante
reviewed
Dec 7, 2021
fregante
reviewed
Dec 7, 2021
| // The hovercard attribute avoids `highest-rated-comment` | ||
| // Avatars next to review events aren't wrapped in a <div> #4844 | ||
| const avatars = select.all(`:is(div.TimelineItem-avatar > [data-hovercard-type="user"]:first-child, a.TimelineItem-avatar):not([href="/${getUsername()!}"], .rgh-quick-mention)`); | ||
| const avatars = select.all(`:is(${[ |
Member
There was a problem hiding this comment.
I'd probably extract this array instead to avoid (`:is(${[
Common is-less example:
const avatarSelector = [
].map(x => x + ':not()');
const avatars = select.all(avatarSelector);
Member
There was a problem hiding this comment.
You could also move this to the lint PR if you prefer
Member
There was a problem hiding this comment.
Latest commit did not match this, let's merge this PR without it and you can make the suggested change in the lint PR if desired.
Co-authored-by: Federico Brigante <[email protected]>
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


See screenshots for the issue
Also, as you can see from the screenshot, there is a
z-indexissue happening. However it should not happen again with this patch, but nevertheless I will leave the fix here for completeness:refined-github/source/features/quick-mention.tsx
Line 48 in 2d70121
Add a
style={{zIndex: 2}}would be fineTest URLs
Screenshot
Before:

After: