-
-
Notifications
You must be signed in to change notification settings - Fork 884
Closed as not planned
Labels
analysisStatus: Requires team/community inputStatus: Requires team/community input
Description
First Check
- I added a very descriptive title here.
- This is not a Q&A. I am sure something is wrong with NiceGUI or its documentation.
- I used the GitHub search to find a similar issue and came up empty.
Example Code
# copy from https://nicegui.io/documentation/page#wait_for_client_connection
import asyncio
from nicegui import ui
@ui.page('/wait_for_connection')
async def wait_for_connection():
ui.label('This text is displayed immediately.')
await ui.context.client.connected()
await asyncio.sleep(2)
ui.label('This text is displayed 2 seconds after the page has been fully loaded.')
@ui.page('/')
def page():
ui.link('wait for connection', wait_for_connection)
ui.run()Description
- Access https://nicegui.io/wait_for_connection , which is running the example code.
- Break the network connection to the server for several seconds. (Or simulate it by browser's dev tool > Network tab)
- Restore the network connection again.
- The page would refresh automatically with a message,
reloading because handshake failed for clientId <uuid>in the console. While I expect it remains the same without any refreshing since I haven't touched it at all and nothing happening should be normal.
Usually, this does not affect so much, but this would be critical for the users with an unstable Internet connection.
I suppose all the code for a page should be only triggered while user access the specified page.
NiceGUI Version
3.1.0 (I am not sure whether this is the same as the NiceGUI document)
Python Version
3.12.10 (I am not sure whether this is the same as the NiceGUI document)
Browser
Other, Chrome
Operating System
macOS
Additional Context
No response
Metadata
Metadata
Assignees
Labels
analysisStatus: Requires team/community inputStatus: Requires team/community input