Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Avoid rendering at focus #2262

Merged
merged 1 commit into from
Feb 12, 2025
Merged

fix: Avoid rendering at focus #2262

merged 1 commit into from
Feb 12, 2025

Conversation

paultranvan
Copy link
Contributor

At each new focus, a full render was triggered, making a visual reload for the user.
To fix this, we do not use query options in the ReloadFocus component, because of: cozy/cozy-client#931 Especially for the apps query, the fetchPolicy is always applied here, because it is called elsewhere, making the query's lastUpdate very close in time. And because of this, the home is rendered after each focus, as the same query gives different result (a complete response, vs an early empty return in this case)

### ✨ Features

*

### 🐛 Bug Fixes

* Do not reload home at focus

### 🔧 Tech

*

At each new focus, a full render was triggered, making a visual refresh
for the user.
To fix this, we do not use query options in the ReloadFocus component,
because of: cozy/cozy-client#931
Especially for the apps query, the fetchPolicy is always applied here,
because it is called elsewhere, making the query's lastUpdate very close
in time. And because of this, the home is rendered after each focus, as
the same query gives different result (a complete response, vs an early
empty return in this case)
Copy link

bundlemon bot commented Feb 12, 2025

BundleMon

Unchanged files (13)
Status Path Size Limits
vendors/home.(hash).js
1.81MB -
services/softDeleteOrRestoreAccounts/home.js
466.15KB -
services/updateAccounts/home.js
463.29KB -
services/deleteAccounts/home.js
311.95KB -
services/myselfFromIdenties/home.js
236.35KB -
services/polyfillFetch/home.js
97.38KB -
app/home.(hash).js
48.62KB -
vendors-home.(hash).(hash).min.css
38.02KB -
intents/home.(hash).js
25.91KB -
services/attributesHelpers/home.js
15.22KB -
app-home.(hash).min.css
1.96KB -
intents/index.html
651B -
intents-home.(hash).min.css
158B -

Total files change -4B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@paultranvan paultranvan merged commit 85c5b4c into feat/offline Feb 12, 2025
2 checks passed
@paultranvan paultranvan deleted the fix/uselessrender branch February 12, 2025 15:11
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.

2 participants