Skip to content

URL include cleanup - #5143

Closed
kidonng wants to merge 7 commits into
refined-github:mainfrom
kidonng:url-match-cleanup
Closed

kidonng wants to merge 7 commits into
refined-github:mainfrom
kidonng:url-match-cleanup

Conversation

@kidonng

@kidonng kidonng commented Dec 2, 2021 •

Copy link
Copy Markdown
Member

Comment thread source/features/linkify-code.tsx Resolved
@kidonng kidonng linked an issue Dec 2, 2021 that may be closed by this pull request
2 of 3 tasks
Comment on lines +40 to +41
() => pageDetect.isGlobalSearchResults() && searchType() === 'code',
() => pageDetect.isRepoSearch() && (searchType() ?? 'code') === 'code',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: this should be backported into github-url-detection's hasCode

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it there directly then

Comment on lines +40 to +41
() => pageDetect.isGlobalSearchResults() && searchType() === 'code',
() => pageDetect.isRepoSearch() && (searchType() ?? 'code') === 'code',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it there directly then

Comment on lines +26 to +28
exclude: [
pageDetect.isGist,
],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok here, but it feels like we should treat isGist similarly to what we do with is404: If the includes/asLongAs have isGist, then enable the feature there, if not don't. There might only be a handful of situation where features can still apply to isGist, like hasCode, but maybe it's better to edit those instead, e.g.

include: [
	hasCode,
	isGist,
]

@kidonng

This comment has been minimized.

@fregante

fregante commented Feb 2, 2022

Copy link
Copy Markdown
Member

Closing as there's no usable code here (as mentioned in the review). Avoid keeping PRs open for 2 months 😃

@fregante fregante closed this Feb 2, 2022
@kidonng

kidonng commented Feb 2, 2022 •

Copy link
Copy Markdown
Member Author

Closing as there's no usable code here (as mentioned in the review).

It would be better as an issue instead, I just prefer actual code (and hate writing similar stuff twice). Also the feedback would be more related (like in this PR. Thanks!)

Avoid keeping PRs open for 2 months 😃

Sorry but that's probably just me being myself again. I don't have an issue with that though. Does it really matter if external changes aren't that much?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants