-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Enable reaction avatars for teams' discussions #871
Enable reaction avatars for teams' discussions #871
Conversation
source/libs/page-detect.js
Outdated
@@ -88,3 +88,5 @@ export const isSingleCommit = () => /^commit\/[0-9a-f]{5,40}/.test(getRepoPath() | |||
export const isSingleFile = () => /^blob\//.test(getRepoPath()); | |||
|
|||
export const isTrending = () => location.pathname.startsWith('/trending'); | |||
|
|||
export const isDiscussion = () => /^([^/]+[/][^/]+\/)teams[/][^/]+[^/]+($|[/]$|[/]discussions)/.test(getCleanPathname()); |
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.
[/]
=> \/
source/libs/page-detect.js
Outdated
@@ -88,3 +88,5 @@ export const isSingleCommit = () => /^commit\/[0-9a-f]{5,40}/.test(getRepoPath() | |||
export const isSingleFile = () => /^blob\//.test(getRepoPath()); | |||
|
|||
export const isTrending = () => location.pathname.startsWith('/trending'); | |||
|
|||
export const isDiscussion = () => /^([^/]+\/[^/]+\/)teams\/[^/]+[^/]+($|\/$|\/discussions)/.test(getCleanPathname()); |
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 \/$|
isn't necessary. getCleanPathname()
never ends with a trailing slash.
🙈 of course! Will update the PR in a few. :)
…On Wed, Dec 13, 2017, 5:57 PM Federico Brigante ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In source/libs/page-detect.js
<#871 (comment)>
:
> @@ -88,3 +88,5 @@ export const isSingleCommit = () => /^commit\/[0-9a-f]{5,40}/.test(getRepoPath()
export const isSingleFile = () => /^blob\//.test(getRepoPath());
export const isTrending = () => location.pathname.startsWith('
/trending');
+
+export const isDiscussion = () => /^([^/]+\/[^/]+\/)teams\/[^/]+[^/]+($|\/$|\/discussions)/.test(getCleanPathname());
I think \/$| isn't necessary. getCleanPathname() never ends with a
trailing slash.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#871 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAuBrDEgAsqnP2MrXFLFLGv6xdyIKFqks5tAAIPgaJpZM4RAhkd>
.
|
@bfred-it thanks! |
Thanks @lukaszklis! |
@bfred-it A little offtopic question related to the changes requested in the PR: does it make sense to adjust linters to meet some of the requirements whenever people contribute to the repo? It might save maintainers’ priceless time on trivial topics. :) |
You mean custom rules? They'd be great, but then we'd have to also (know how to) code and debug them. |
I found out today the reaction avatars were not working for the recently launched ”Discussions” feature on GitHub. Unfortunately I do not have a live public example to link directly to test it, however I attach some screenshots before and after the change.
Before:
After: