Skip to content

46 fix elevation control panel bug #55

Merged
merged 9 commits into from
Oct 30, 2025
Merged

Conversation

mariewah
Copy link
Member

@mariewah mariewah commented Oct 30, 2025

Issue number

Closes #46

Description

Fixes the elevation panel bug :D
Also made the file structure a bit more informative

Testing steps

Alternate between measurements/annotations and elevation/accepted:

  • Create measurements and save locations, try different combinations of clicking the accepted filtering and elevation control. Just want to confirm that both panels are built when called on

Screenshots (optional)

Summary by CodeRabbit

  • Bug Fixes

    • Resolved scroll-freezing and race conditions when activating filtering options.
  • Performance

    • Improved filter responsiveness by tightening polling for faster reactions.
  • Refactor

    • Consolidated and reorganized filtering components for cleaner structure.
  • UI

    • Updated filtering styles and layout, affecting appearance and behavior of filtering controls.

@mariewah mariewah linked an issue Oct 30, 2025 that may be closed by this pull request
@mariewah mariewah self-assigned this Oct 30, 2025
@coderabbit
Copy link

coderabbit bot commented Oct 30, 2025

Walkthrough

Swaps the filtering stylesheet to src/Filter/filter.css, renames the init API from initThreePanelsinitFilterPanels, renames elevation panel IDs (elevation2_listelevation_list), removes THU/TVU-related selectors, tightens polling interval, and adds a re-entrancy scroll-suppression guard during filter activation.

Changes

Cohort / File(s) Summary
HTML
index.html
Replaced included stylesheet src/AcceptedFiltering/threePanels.css with src/Filter/filter.css.
Viewer Initialization
src/potreeViewer.js
Import/use updated from AcceptedFiltering/threePanelsFilter/filter; call site changed from initThreePanels(...)initFilterPanels(...); added suppressionActive re-entrancy guard and refined suppressSidebarAutoScroll control flow and restoration.
Filter JS
src/Filter/filter.js
Export renamed initThreePanelsinitFilterPanels; internal IDs updated (elevation2_listelevation_list); scaffold/wiring calls updated; default poll interval reduced (120ms → 10ms).
Filter CSS
src/Filter/filter.css
Consolidated button selectors to #doAcceptedFiltering; removed THU/TVU layout blocks/selectors; renamed elevation container selectors (#elevation2_list#elevation_list); simplified list/accordion and header label selectors.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Viewer as Viewer
    participant FilterInit as initFilterPanels
    participant UI as Filter UI
    participant Suppress as suppressSidebarAutoScroll

    Viewer->>FilterInit: initFilterPanels(viewer, hooks)
    FilterInit->>Suppress: enter suppression (sets suppressionActive)
    Suppress-->>FilterInit: suppressionActive = true
    FilterInit->>UI: create scaffolds (elevation_list, accepted_list_host)
    FilterInit->>UI: attach handlers / ensure buttons
    UI-->>Viewer: UI ready
    FilterInit->>Suppress: release suppression (restore scroll/focus)
    Suppress-->>FilterInit: suppressionActive = false
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Inspect src/potreeViewer.js suppression logic paths for correct set/reset of suppressionActive.
  • Verify all imports/exports and call sites updated from initThreePanelsinitFilterPanels.
  • Confirm ID rename (elevation2_listelevation_list) consistency across HTML, JS, and CSS.
  • Review polling change (120ms → 10ms) for potential timing/performance effects.
  • Check removal of THU/TVU selectors for orphaned markup or layout regressions.

Poem

🐇 I hopped through CSS and renamed a list,
Buttons trimmed neatly with a flick of my wrist.
I tightened the ticks, quieted scroll’s spat,
One filter now sings — tidy and compact.
Nibble, nibble — code polished; I’m glad of that.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between e902c80 and 1703cb7.

📒 Files selected for processing (1)
  • src/potreeViewer.js (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/potreeViewer.js

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@franmagn franmagn left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@kleinc kleinc left a comment

Choose a reason for hiding this comment

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

Nice! Just a small comment on big A/small a.

@mariewah mariewah requested review from kleinc and adriahso October 30, 2025 13:08
Copy link
Member

@adriahso adriahso left a comment

Choose a reason for hiding this comment

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

LGTM!

Fix typo in comment

Co-authored-by: Adrian Haabpiht Solberg <adriahso@stud.ntnu.no>
Copy link
Member

@kleinc kleinc left a comment

Choose a reason for hiding this comment

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

LGTM!

@mariewah mariewah merged commit 923d8d6 into dev Oct 30, 2025
2 checks passed
@mariewah mariewah deleted the 46-fix-elevation-control-panel-bug branch October 30, 2025 15:23
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix elevation control panel bug
4 participants