Skip to content

Refactor clean-conversation-headers - #4152

Merged
yakov116 merged 21 commits into
refined-github:mainfrom
kidonng:clean-conversation-headers
Apr 15, 2021
Merged

Refactor clean-conversation-headers#4152
yakov116 merged 21 commits into
refined-github:mainfrom
kidonng:clean-conversation-headers

Conversation

@kidonng

@kidonng kidonng commented Mar 24, 2021

Copy link
Copy Markdown
Member

Resolve #4145

Code readability 5x improved (possibly)

Test URL Before After
Open PR (default branch)
Open PR (non-default branch)
Merged PR (same author)
Merged PR (different author)
Closed PR

Extra test URL: parcel-bundler/parcel#78 (for #3987)

image

Also updated screenshot:

image

@kidonng
kidonng marked this pull request as draft March 24, 2021 09:44
@kidonng kidonng changed the title Drop from and into words in clean-conversation-headers Drop from and into words in clean-conversation-headers Mar 24, 2021
@kidonng

This comment has been minimized.

@kidonng kidonng changed the title Drop from and into words in clean-conversation-headers Refactor clean-conversation-headers Mar 24, 2021
@kidonng
kidonng marked this pull request as ready for review March 24, 2021 12:46
Comment thread source/features/clean-conversation-headers.tsx Outdated
Co-authored-by: yakov116 <16872793+yakov116@users.noreply.github.com>

@fregante fregante left a comment

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.

Overall they look like good improvements 🙌

Comment thread source/features/clean-conversation-headers.tsx Outdated
Comment thread source/features/clean-conversation-headers.tsx Outdated
Comment thread source/features/clean-conversation-headers.tsx Outdated
@fregante
fregante marked this pull request as draft April 5, 2021 08:52
@yakov116

Copy link
Copy Markdown
Member

@kidonng this really looks great! Do you have time to finish this up?

@kidonng

kidonng commented Apr 11, 2021

Copy link
Copy Markdown
Member Author

Yeah possibly today

@yakov116

Copy link
Copy Markdown
Member

@kidonng just some feedback I used this the past day. It really looks great!

@yakov116
yakov116 marked this pull request as ready for review April 14, 2021 00:54
@yakov116
yakov116 requested a review from fregante April 14, 2021 00:54
Comment thread source/features/clean-conversation-headers.tsx Outdated
Comment thread source/features/clean-conversation-headers.tsx Outdated
const author = select('.author', byline)!;
const isSameAuthor = pageDetect.isPRConversation() && author.textContent === (await elementReady('.TimelineItem .author'))!.textContent;

const base = select('.commit-ref', byline)!;

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.

Doesn't this have a .base-ref?

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.

Not always

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.

When wouldn’t it? Link?

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.

Comment thread source/features/clean-conversation-headers.tsx Outdated
Co-Authored-By: Fregante <opensource@bfred.it>
Comment thread source/features/clean-conversation-headers.tsx Outdated

@fregante fregante left a comment

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.

Untested


// Replace the word "from" with an arrow
headBranch.previousSibling!.replaceWith(' ', <ArrowLeftIcon/>, ' ');
headBranch.previousSibling!.replaceWith(' ', <ArrowLeftIcon className="v-align-middle"/>, ' ');

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.

hmmm it doesn't seem to change anything here in Safari

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.

Video_2021-04-14_230735

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.

Perhaps I didn’t notice. 👍 🚀

@yakov116
yakov116 merged commit 8ca75a9 into refined-github:main Apr 15, 2021
@kidonng

kidonng commented Apr 25, 2021

Copy link
Copy Markdown
Member Author

Thanks for finishing this! I got busy in previous weeks and kinda left tracking RGH :(

@yakov116

Copy link
Copy Markdown
Member

NP I am so glad you started this I love the change!

@kidonng
kidonng deleted the clean-conversation-headers branch August 2, 2021 18:47
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.

Drop from and into words in clean-conversation-headers

3 participants