Skip to content

Conversation

@yakov116
Copy link
Member

@yakov116 yakov116 commented Jun 4, 2021

Fixes #3945

Make features faster closes #3673

@yakov116 yakov116 marked this pull request as ready for review June 4, 2021 14:58
@yakov116 yakov116 changed the title lint Lint and small bug fixes Jun 4, 2021
@yakov116 yakov116 added the meta Related to Refined GitHub itself label Jun 4, 2021
@yakov116 yakov116 marked this pull request as draft June 4, 2021 16:45
@fregante
Copy link
Member

fregante commented Jun 5, 2021

#4444 nice.

@fregante
Copy link
Member

fregante commented Jun 6, 2021

Can you also drop the comment at the top of refined-github.ts since we’re going to use hotfixes from now on?

@fregante
Copy link
Member

fregante commented Jun 6, 2021

What's b45b4bb? It's not mentioned in the post and there are no test links or bug issues

@yakov116
Copy link
Member Author

yakov116 commented Jun 6, 2021

What's b45b4bb? It's not mentioned in the post and there are no test links or bug issues

I marked it as draft. My computer broke (son dropped it 😢), I have to redo the whole first post. Will do when I can.

@yakov116
Copy link
Member Author

yakov116 commented Jun 6, 2021

That checks if the date of the comment is after or before the last commit.

The selector needed to be updated.

async function hideProjects(): Promise<void> {
if (!await hasProjects()) {
(await elementReady('[data-hotkey="p"]'))!.parentElement!.remove();
(await elementReady('[data-hotkey="p"]'))?.parentElement!.remove();
Copy link
Member

Choose a reason for hiding this comment

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

Line 57 exactly checks for projects. If we get to line 58, there should not be any projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm I will double check what's going on

Copy link
Member Author

Choose a reason for hiding this comment

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

Line 57 exactly checks for projects.

Correct but it does not check if the projects dropdown exists.
I have the error on https://github.com/download-directory/download-directory.github.io/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Let's merge hideProjects and hasProjects into something that makes more sense. Currently the condition is "has projects" while it tries to be "should it hide the section"

Why are we even checking for projects if there's no sidebar section to hide at all?

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Other than source/features/comments-time-machine-links, which I haven't verified, and the reverted commit, the code so far is approved.

@yakov116
Copy link
Member Author

yakov116 commented Jun 9, 2021

Other than source/features/comments-time-machine-links,

example url that should not show the bar

https://github.com/sindresorhus/refined-github/blob/main/source/features/action-used-by-link.tsx?rgh-link-date=2021-04-28T07%3A12%3A39Z

@yakov116 yakov116 marked this pull request as ready for review June 10, 2021 04:06
@yakov116 yakov116 requested a review from fregante June 10, 2021 09:37
@fregante
Copy link
Member

example url that should not show the bar

I'm confused, why should that page not show the bar?

  • It points to a branch
  • The URL has a date in April

// eslint-disable-next-line import/prefer-default-export
export function getCommitHash(commit: HTMLElement): string {
return commit.querySelector('a[href]')!.pathname.split('/').pop()!;
return commit.querySelector('a[href]:not(.js-issue-link)')!.pathname.split('/').pop()!;
Copy link
Member

Choose a reason for hiding this comment

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

Does not work? PRs also have the same class

Screen Shot

Copy link
Member Author

Choose a reason for hiding this comment

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

PR's? We are catching the wrong link.

From now on I will open an issue for each and thing I want to fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

From now on I will open an issue for each and thing I want to fix.

If you're writing a PR, you can include the details in the PR itself to save some time

@fregante fregante changed the title Lint and small bug fixes Small bug fixes Jun 10, 2021
@fregante fregante merged commit 8510894 into main Jun 10, 2021
@fregante fregante deleted the dep branch June 10, 2021 10:03
@fregante
Copy link
Member

fregante commented Jun 10, 2021

Thanks for the many bug fixes but it's best to open multiple PRs, following the template. If I can't see the bug in a link, in a screenshot, and/or in a issue, I'm reverting.

@fregante fregante added the bug label Jun 10, 2021
@yakov116
Copy link
Member Author

Thanks for the many bug fixes but it's best to open multiple PRs, following the template. If I can't see the bug in a link, in a screenshot, and/or in a issue, I'm reverting.

Please look at the first post post....

@fregante
Copy link
Member

fregante commented Jun 10, 2021

Where are the screenshots? I don’t know what “Fix duplication in show-whitespace” refers to. No screenshot of bug, no screenshot of fix, no link to any issues for most fixes here.

We had discussed that specific bug somewhere but that doesn’t mean everyone reading knows; I’m not sure I remember what the bug was specifically. Follow the template, it’s just easier to understand and review. I don’t know why I have to explain how to follow a template in every PR you open.

@fregante fregante removed the meta Related to Refined GitHub itself label Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants