Skip to content

🍰 Code migrations #7000

Open
Open

Description

@fregante

We can track here long-term code transitions and PRs can reference this issue.

There's no need to manually go through and change all the features, but they're worth keeping in mind if we're already working on a specific feature.

Activity

  1. added
    small
    meta
    and removed
    small
    on Oct 25, 2023
  2. changed the title [-]`releases-tab` appears in dropdown even when there are no releases[/-] [+]It's not yet over 9000[/+] on Oct 25, 2023
  3. changed the title [-]It's not yet over 9000[/-] [+]Code migrations[/+] on Aug 13, 2024
  4. fregante commented on Aug 13, 2024

    @fregante
    MemberAuthor

    Drop awaitDomReady: true

    This isn't required, but generally we should prefer:

    • using the selector observer instead of $$()
    • having async detections via elementReady, if they're DOM-based
  5. fregante commented on Aug 13, 2024

    @fregante
    Author
  6. fregante commented on Aug 13, 2024

    @fregante
    MemberAuthor

    Replace attachElement with observer

    attachElement is our previous deduplicating method, we should now prefer the selector observer. This isn't always practical, but attachElement is to be considered legacy

  7. fregante commented on Aug 13, 2024

    @fregante
    MemberAuthor

    Replace deduplicate with observer

    deduplicate: 'has-rgh' is the old way to mark entire views as "processed". These are at risk of breaking (or are already broken) when GitHub changes the way pages are updated.

    Using the selector observer is preferrable

  8. changed the title [-]Code migrations[/-] [+]🍰 Code migrations[/+] on Aug 13, 2024
  9. fregante commented on Aug 14, 2024

    @fregante
    Author
  10. fregante commented on Aug 20, 2024

    @fregante
    MemberAuthor

    Replace element-ready with observer.waitForElement

    Seen in https://github.com/refined-github/refined-github/blob/80fe729d781121e0c9348ed96e6eb2f71a9fd315/source/helpers/selector-observer.tsx

    There are two limitations:

    • element-ready waits for the whole element to finish loading; the observer would fire immediately after the first paint
    • element-ready works on elements that are not visible; the observer only fires when the element is painted
  11. fregante commented on Oct 4, 2024

    @fregante
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedmeta

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions