Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Meta Refactoring - APE.dom

Aperta
#11 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Start by inventorying APE.dom and its callers, especially the className, DOM traversal, style, and constants functions. Compare the existing APE.dom.Event, APE.EventPublisher, getPixelCoords, and getOffsetCoords objects before proposing boundaries. Done means a decided decomposition and an organized migration of the affected interfaces and callers.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

APE.dom is a god object that can be broken up.

Breaking up APE.dom encourages keeps the size and complexity of the core trim while allowing proliferation of more interface-objects for various contexts.

Currently, APE.dom does:

  • className functions (has, add, remove, toggle, getElementsBy, findAncestorWith)
  • DOM Traversal (contains, findAncestorWithAttribute, nextSiblingElement, etc)
  • style reading
  • constants

The problems is that as more widgets are created, more context needs are created and APE.dom grows.

TODO: Investigate breaking off smaller chunks into their own objects.

Investigate where similar interface objects exist and how they can be organized. Two examples:

  • APE.dom.Event
  • APE.EventPublisher 2)
    • APE.dom.getPixelCoords
    • APE.dom.getOffsetCoords

    className functions - APE.className? APE.dom.className?
    traversal functions - APE.dom.traversal ?
    style functions APE.dom.style? APE.elementStyle?

    The DOM constants are used throughout, where does it go? APE.dom.constants, or simply remain on a whittled APE.dom?

  • Lingua principale
    JavaScript
    Stelle
    32
    Fork
    3
    Metriche di merge delle PR
    Nessuna PR unita negli ultimi 30g

    Preparare l'ambiente

    Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

    Come iniziare

    1. Leggi tutta la issue e poi la guida ai contributi del progetto.
    2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
    3. Fai un fork del repository e lavora su un branch.
    4. Apri una pull request che faccia riferimento al numero della issue.

    Altre issue di GarrettS/ape-javascript-library

    Tutte le issue di GarrettS/ape-javascript-library

    Issue simili

    Altre issue su JavaScript

    Ricevi le nuove issue nella tua casella

    Un breve riepilogo di issue GitHub adatte ai principianti.