Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor conversation-links-on-repo-list to use selector-observer #3514

Merged
merged 4 commits into from
Sep 25, 2020

Conversation

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.

Looks right

@fregante
Copy link
Member

fregante commented Aug 28, 2020

Actually… it’s not faster. I found out that selector-observer always waits for dom-ready. This sort of limits the usefulness of this package. I wonder if we need to find another package.

It makes sense that it waits (for performance reasons) but also this means that features are no longer instant.

@yakov116
Copy link
Member Author

yakov116 commented Aug 28, 2020

Your right. 😢 https://github.com/josh/selector-observer/blob/master/lib/ready.js

I have however found that on Ajax requests or when we were doing observelement on init this was faster. But otherwise it only makes it simpler.

@fregante fregante changed the title Faster conversation-links-on-repo-list Refactor conversation-links-on-repo-list to use selector-observer Aug 29, 2020
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.

👎 This doesn't seem to have benefits, according to #3084 (comment) — that is, this is not a "ajaxed hot-area"

Thoughts?

@fregante
Copy link
Member

I guess this does have observeElement('#user-repositories-list', init) and the initialization is slightly shorter. It could be ok

@fregante fregante added meta Related to Refined GitHub itself and removed enhancement labels Aug 29, 2020
@fregante fregante closed this Sep 9, 2020
@fregante fregante reopened this Sep 25, 2020
@yakov116 yakov116 requested a review from fregante September 25, 2020 01:59
@yakov116 yakov116 merged commit 64fe9ad into refined-github:master Sep 25, 2020
@yakov116 yakov116 deleted the fasterconvolink branch September 25, 2020 02:31
@fregante
Copy link
Member

Congrats on your first merged PR 😸

@yakov116
Copy link
Member Author

Thanks!

init
}, {
include: [
pageDetect.isGlobalSearchResults,
pageDetect.isUserProfileRepoTab
Copy link
Contributor

@jerone jerone Sep 26, 2020

Choose a reason for hiding this comment

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

Duplicate page detect :)

Copy link
Member

Choose a reason for hiding this comment

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

I feel a Lint PR coming

Copy link
Member Author

Choose a reason for hiding this comment

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

@fregante I am going to send a lint pr but I only have 2 small things. Have any lint in mind??

Copy link
Member

@fregante fregante Sep 29, 2020

Choose a reason for hiding this comment

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

Can you cleanup some feature names?

  • cleanup -> clean
  • rename add-tags-to-commits to tags-on-commits-list

Also if you want to:

  • Ensure descriptions always end with . and use the 3rd person (in source or readme). grep/ripgrep or your editor’s search can help
  • Change all cache durations to be on one line, i.e. maxAge: {hours: 1}
  • Double-check if TODOs have been resolved or can easily be resolved
  • Verify whether some screenshots: false features could have a screenshot
  • Check whether features still work, picking some at random or in any order you'd like

Not quite lint, but:

lint-ideas

Copy link
Member Author

@yakov116 yakov116 Sep 29, 2020

Choose a reason for hiding this comment

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

  • Change all cache durations to be on one line, i.e. maxAge: {hours: 1}

Haha I made them on new lines since I though it was easier to read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Related to Refined GitHub itself
Development

Successfully merging this pull request may close these issues.

3 participants