Skip to content

Fix: Pull-to-Refresh not working#3531

Merged
sfeilmeier merged 4 commits intoOpenEMS:developfrom
Sn0w3y:fix-pull-to-refresh
Jan 23, 2026
Merged

Fix: Pull-to-Refresh not working#3531
sfeilmeier merged 4 commits intoOpenEMS:developfrom
Sn0w3y:fix-pull-to-refresh

Conversation

@Sn0w3y
Copy link
Copy Markdown
Collaborator

@Sn0w3y Sn0w3y commented Jan 20, 2026

Pull-to-refresh doesn't work properly on the Live page. Two issues:

  1. ion-refresher is placed outside ion-content - Ionic requires it to be inside
  2. There's a duplicate refresher in live.component.html that shouldn't be there

Changes

pull-to-refresh.ts

Moved the refresher inside ion-content where it belongs. Also changed the logic so the pull gesture is always available - the visual hint ("Pull to refresh" text with arrows) still only shows when data is stale.

Before:

@if (show) {
  <ion-refresher>...</ion-refresher>
}
<ion-content>...</ion-content>

After:

<ion-content>
  <ion-refresher>...</ion-refresher>
  @if (show) {
    <!-- visual hint -->
  }
</ion-content>

live.component.html

Removed the duplicate ion-refresher that was passed as content - the component already handles this via the [refresh] input.

Also moved all the grid content inside oe-refresh-view so it's actually scrollable with the refresher.

How to test

  1. Go to Live page
  2. Pull down - should trigger refresh
  3. Wait 20+ seconds without data updates - "Pull to refresh" hint should appear
  4. Pull down again - should still work

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3531      +/-   ##
=============================================
+ Coverage      59.17%   59.18%   +0.01%     
  Complexity       105      105              
=============================================
  Files           3040     3040              
  Lines         132213   132213              
  Branches        9757     9757              
=============================================
+ Hits           78225    78237      +12     
+ Misses         51047    51036      -11     
+ Partials        2941     2940       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@da-Kai da-Kai requested a review from lukasrgr January 21, 2026 07:32
@da-Kai da-Kai requested a review from sfeilmeier January 21, 2026 07:36
@sfeilmeier sfeilmeier merged commit 55a57cb into OpenEMS:develop Jan 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants