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

Extend Column mode removes annotation click listeners permanently

Aperta
#505 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Inizia da interfaces/manage-columns/index.js e confronta i relativi registri di pulizia con components/create-column/index.js, concentrandoti su extendColumn(), mergeColumns(), renderAnnotations() e disconnectedCallback(). Verifica la modifica riproducendo i toggle Extend Column e Merge Column: i riquadri dell'overlay delle annotazioni dovrebbero rimanere cliccabili in queste modalità e dopo essere usciti da esse.

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

Descrizione

bug

Bug Description

On the Manage Columns page, entering Extend Column mode (checking the checkbox) permanently removes all annotation overlay box click listeners. Users cannot select any lines on the image — not during Extend mode, and not after unchecking it.

This also affects Merge Column mode for the same reason, though merge mode doesn't require clicking annotations so it's less visible there.

Steps to Reproduce

  1. Navigate to a project's Manage Columns page with annotation lines visible
  2. Verify you can click annotation overlay boxes (they highlight and show selection numbers)
  3. Check the Extend Column checkbox
  4. Try to click annotation overlay boxes — they no longer respond to clicks
  5. Uncheck the Extend Column checkbox
  6. Try to click annotation overlay boxes again — still no response

Expected Behavior

  • Annotation overlay boxes should remain clickable in Extend mode (users need to select annotations to add to a column)
  • After exiting Extend/Merge mode, annotation click behavior should be fully restored

Root Cause

PR #499 consolidated the old workspaceCleanup registry (for workspace buttons) into renderCleanup (which also manages annotation box listeners). When extendColumn() or mergeColumns() calls this.renderCleanup.run() to clear workspace buttons, it also removes all annotation box click listeners registered by renderAnnotations().

The old components/create-column/index.js used three separate registries to avoid this:

  • cleanup — persistent listeners (window, document, eventDispatcher)
  • renderCleanup — annotation overlay box listeners
  • workspaceCleanup — workspace button listeners

The refactored interfaces/manage-columns/index.js only uses two (cleanup and renderCleanup), mixing annotation and workspace concerns.

Relevant code (interfaces/manage-columns/index.js):

extendColumn() {
    this.renderCleanup.run()  // ← Removes ALL renderCleanup listeners, including annotation boxes
    // ... creates workspace buttons also via this.renderCleanup
}

Suggested Fix

Reintroduce workspaceCleanup as a separate CleanupRegistry for workspace-specific listeners:

  1. Add workspaceCleanup = new CleanupRegistry() class field
  2. In extendColumn() and mergeColumns(), replace this.renderCleanup.run() with this.workspaceCleanup.run()
  3. Register workspace buttons on this.workspaceCleanup instead of this.renderCleanup
  4. Add this.workspaceCleanup.run() to disconnectedCallback()

Context

  • Branch: 346-column-refresh-refactor
  • PR: #499
  • Introduced by: Consolidation of workspaceCleanup into renderCleanup during refactor
  • Confirmed by: Manual testing — lines are unselectable after toggling extend mode
Lingua principale
JavaScript
Stelle
2
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 CenterForDigitalHumanities/TPEN-interfaces

Tutte le issue di CenterForDigitalHumanities/TPEN-interfaces

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.