Skip to content

Add back mark-merge-commits-in-list feature - #2832

Merged
fregante merged 26 commits into
refined-github:masterfrom
yakov116:dim_commits
Mar 3, 2020
Merged

fregante merged 26 commits into
refined-github:masterfrom
yakov116:dim_commits

Conversation

@yakov116

@yakov116 yakov116 commented Feb 26, 2020 •

Copy link
Copy Markdown
Member

closes #2827

I hate typescript

I did not add the icon since typescript would not let me.
wasted used about an hour because if it 😕

image
https://github.com/babel/babel/commits/master?after=ddd40bf5c7ad8565fc990f26142f85613958a329+104

@yakov116

Copy link
Copy Markdown
Member Author

@fregante this is what you meant?


function filterCommits(commits: object): string[] {
const mergeCommits = [];
for (const commit of Object.entries(commits)) {

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.

Destructure, so you don’t have to use commit[1] later

Suggested change
for (const commit of Object.entries(commits)) {
for (const [key, commit] of Object.entries(commits)) {

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.

Please follow my reviews fully, especially when I provide exact code suggestions. I used key because the value will be the API's escaped key, not the commit. It becomes commit only after you apply .slice(1)

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.

No problem.

Just go easy on me. I am working hard and I am also fighting with typescript too.

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.

Is this the only issue?

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.

@fregante
the return value is

{_0341d299c80dbfc8f4aabbb4d36829db8cf7f2a9:
parents:
totalCount: 1}

so key would be the commit and the second value is the parents. Can You give me a drop more detail where i'm going wrong?

@fregante fregante Feb 28, 2020 •

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.

Copy-paste my code suggestion, that’ll make it right. The variable names were changed.

It takes time to review. If a review comment is (partially) ignored then we’re both wasting time. Nobody likes that

@yakov116
yakov116 requested a review from fregante February 27, 2020 14:11
@fregante

Copy link
Copy Markdown
Member

Can you always include a screenshot in the first comment when un-drafting a PR? This way one doesn't have to check out the PR to make sure it looks right

@yakov116

Copy link
Copy Markdown
Member Author

Can you always include a screenshot in the first comment when un-drafting a PR? This way one doesn't have to check out the PR to make sure it looks right

Sure

@fregante

Copy link
Copy Markdown
Member

It looks good. I suggest dimming the buttons on the right too and simplify the selector

@fregante fregante changed the title add back mark-merge-commits-in-list Add back mark-merge-commits-in-list feature Feb 28, 2020
@yakov116

Copy link
Copy Markdown
Member Author

@fregante the old style was like this
image
Do you want to follow that or the new style is fine?

@fregante

Copy link
Copy Markdown
Member

That wasn't the style that was approved in that PR: #1121 (comment)

The current format is fine, but I'd dim the whole line, including the buttons.

@yakov116

yakov116 commented Feb 28, 2020 •

Copy link
Copy Markdown
Member Author

image
Is this good?

Or this

image

@yakov116
yakov116 marked this pull request as ready for review February 28, 2020 16:10
@fregante

fregante commented Mar 1, 2020

Copy link
Copy Markdown
Member

Correct. The highlight is still there so it makes sense to show the whole thing. dim-bots works similarly

@fregante
fregante merged commit a65b871 into refined-github:master Mar 3, 2020
@yakov116
yakov116 deleted the dim_commits branch March 15, 2020 03:29
@fregante fregante mentioned this pull request Jun 3, 2020
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.

Add dim-merge-commits feature

2 participants