Skip to content

Allow multiple loaders in a single features.add - #2925

Merged
fregante merged 13 commits into
masterfrom
allow-multiple-loaders
Apr 3, 2020
Merged

fregante merged 13 commits into
masterfrom
allow-multiple-loaders

Conversation

@fregante

Copy link
Copy Markdown
Member

Not yet tested

  1. Allow multiple loaders in a single features.add (avoids having to set useless description: '' properties)
  2. Allow any loading method combination (avoids weird functions like nowAndOnAjaxedPages)

I'd also like to remove description/screenshot from features.add, ideally as export description = '' so they will be tree-shaken.

Suggestions? I need something that can be validated/required like TypeScript does

@fregante fregante added accepted meta Related to Refined GitHub itself needs readme update labels Mar 23, 2020
@yakov116

yakov116 commented Apr 1, 2020

Copy link
Copy Markdown
Member

@fregante you marked this as help wanted. How can I help?

@fregante

fregante commented Apr 1, 2020

Copy link
Copy Markdown
Member Author

I'd also like to remove description/screenshot from features.add, ideally as export description = '' so they will be tree-shaken.

Suggestions? I need something that can be validated/required like TypeScript does

This part

@fregante

fregante commented Apr 3, 2020 •

Copy link
Copy Markdown
Member Author

The idea of adding multiple load events has to be rethought from scratch because it can't work. There are 2 very different events:

  1. page change
  2. something on the current page changed

And this representation alone is wrong too, it should be:

  1. page change
    a. something on the current page changed

What happens on 1 that has to happen before 1a:

  • deinit
  • page-detect

Even the previous mechanism is probably broken (e.g. features.onNewComments)


For this reason I'm reducing back the scope of this PR to avoid multiple features.add for the same feature.

@fregante
fregante marked this pull request as ready for review April 3, 2020 16:55
@fregante
fregante requested a review from notlmn as a code owner April 3, 2020 16:55
@fregante
fregante merged commit 45ab67e into master Apr 3, 2020
@fregante
fregante deleted the allow-multiple-loaders branch April 3, 2020 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

2 participants