Skip to content

Add remove-checks-tab feature - #1929

Merged
fregante merged 9 commits into
refined-github:masterfrom
janat08:hideChecks
Apr 20, 2019
Merged

fregante merged 9 commits into
refined-github:masterfrom
janat08:hideChecks

Conversation

@janat08

@janat08 janat08 commented Apr 14, 2019

Copy link
Copy Markdown
Contributor

checks not gone- non zero: zeke/semantic-pull-requests#40
not gone- selected: https://github.com/sindresorhus/refined-github/pull/1928/checks
this page demonstrates it being gone unless youre owner

closes #1304

@sindresorhus

sindresorhus commented Apr 17, 2019 •

Copy link
Copy Markdown
Member

Can you fix the merge conflict and rebase from master (we enabled TS strict mode) and fix any issues?

The PR needs a more descriptive title.

@Phrynobatrachus Phrynobatrachus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like it's working fine for me on Firefox after strict mode errors are cleaned up.

Comment thread source/features/remove-checks-tab.tsx Resolved
Comment thread source/features/remove-checks-tab.tsx Resolved
Comment thread source/libs/page-detect.ts Resolved
Comment thread source/features/remove-checks-tab.tsx Resolved
@fregante fregante changed the title checks tab be gone Add remove-checks-tab feature Apr 19, 2019
Comment thread source/libs/page-detect.ts Resolved
@fregante

fregante commented Apr 19, 2019 •

Copy link
Copy Markdown
Member

Please run this to delete the tags from your fork and locally, we keep pulling them from forks and pushing them to this repo (we no longer use tags)

git tag -d $(git tag | grep -E '.')
git ls-remote --tags --refs origin | cut -f2 | xargs git push origin --delete

}

// Only remove the tab if it's not the current page and if it has 0 checks
const checksCounter = select('.tabnav-tab[href$="/checks"]:not(.selected) .Counter');

@fregante fregante Apr 20, 2019 •

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.

I dropped safeElementReady here because onAjaxedPages always waits for domReady first.

We currently don't have a callback that is called before domready and supports ajaxed pages. It'd be great to have that at some point, not as part of this PR.

@fregante
fregante merged commit 5d7fee4 into refined-github:master Apr 20, 2019
@fregante

Copy link
Copy Markdown
Member

Thanks! ✅

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.

Hide "Checks" tab on Pull request page

4 participants