Skip to content

Fixes for offline mode - #4272

Merged
nightnei merged 3 commits into
trunkfrom
improveOfflineMode
Jul 23, 2026
Merged

Fixes for offline mode#4272
nightnei merged 3 commits into
trunkfrom
improveOfflineMode

Conversation

@nightnei

Copy link
Copy Markdown
Contributor

How AI was used in this PR

AI assisted

Proposed Changes

While smoke-testing whole Studio, I noticed that offline tooltips are not added to a few places and "Live preview" button is not disabled (See testing instructions).

Testing Instructions

diff --git a/apps/studio/src/hooks/use-offline.ts b/apps/studio/src/hooks/use-offline.ts
index 296408e91..259725c5f 100644
--- a/apps/studio/src/hooks/use-offline.ts
+++ b/apps/studio/src/hooks/use-offline.ts
@@ -9,5 +9,5 @@ export function useOffline() {
        useWindowListener( 'offline', () => {
                setIsOffline( true );
        } );
-       return isOffline;
+       return true;
 }
  1. Click "Add a site"
  2. Assert that Connect a site has tooltip
    Screenshot 2026-07-20 at 18 16 39
  3. Assert that "Live preview" is disabled and has tooltip
    Screenshot 2026-07-20 at 18 16 52
  4. Assert that "Login" button in top right correner of Studio has tooltip
    Screenshot 2026-07-20 at 18 16 25
@nightnei
nightnei requested a review from a team July 21, 2026 10:19
@nightnei nightnei self-assigned this Jul 21, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 56262de vs trunk

app-size

Metric trunk 56262de Diff Change
App Size (Mac) 1355.70 MB 1355.67 MB 0.03 MB ⚪ 0.0%

site-editor

Metric trunk 56262de Diff Change
load 1082 ms 1073 ms 9 ms ⚪ 0.0%

site-startup

Metric trunk 56262de Diff Change
siteCreation 6977 ms 7032 ms +55 ms 🔴 0.8%
siteStartup 2346 ms 2348 ms +2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested and works as describe with one issue: Live Preview is still clickable while offline

Edit: My mistake while testing, it is working as described
image

@nightnei
nightnei merged commit 770e92a into trunk Jul 23, 2026
14 checks passed
@nightnei
nightnei deleted the improveOfflineMode branch July 23, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants