Repository navigation
Add hasFooEditor - #105
Add hasFooEditor#105
hasFooEditor#105Conversation
|
@fregante Just curious, is there anything preventing this repo from migrating to @refined-github? Or do you simply prefer to keep it as-is? |
|
Good idea, I think it'd be better to add I chose not to migrate it for now |
Sounds good, breaking changes matter. I do consider the name a little bit weird though. Regardless of how this is going, |
"Weird" in the sense that there's no "file editor" page. Is "hasFileEditor" better? |
| ]); | ||
|
|
||
| export const hasFileEditor = (url: URL | HTMLAnchorElement | Location = location): boolean => isEditingFile(url) || isNewFile(url) || isDeletingFile(url); | ||
| collect.set('hasFileEditor', [ |
There was a problem hiding this comment.
You can also mark them as combinedTestOnly to avoid having to list the URLs. But it's fine either way
|
You can merge this PR, I added you as a collab. You can release a new minor version: https://github.com/fregante/github-url-detection/actions/workflows/npm-publish.yml
|
I will try to move this repo to the organization, but I have to set up redirects for the github.io domain, change the meta, and then ensure that the secrets still work. You can help by opening a PR to make the meta changes (fregante/github-url-detection -> refined-github/github-url-detection) Ideally we'd also have the same npm auto-publishing setup on the other repository, so PR welcome there too to copy the workflow. |

Reason: both kind of pages are almost identical ("editing something").
While both are frequently used together, sometimes
isNewFoois easily left out since it's a special case that doesn't matter most of the time.To replicate the old behavior ofisEditingFoo, useisEditingFoo() && !isNewFoo().We need some utils to check for these pages at the same time.
Changes:
hasFileEditor:isEditingFile,isNewFileandisDeletingFilehasReleaseEditor:isEditingReleaseandisNewReleasehasWikiPageEditor:isEditingWikiPageandisNewWikiPagehasRichTextEditorchecks forhasReleaseEditorinstead ofisEditingRelease