-
-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve generation of unique tab IDs (#3876)
This PR improves the way tab IDs are generated to avoid duplicated tabs causing shared tab storage (#3872). The ides originates from this post on StackOverflow: https://stackoverflow.com/a/36807854/3419103 I successfully tested it with this code snippet: ```py @ui.page('/') async def main(): await ui.context.client.connected() if 'id' not in app.storage.tab: app.storage.tab['id'] = str(uuid.uuid4()) ui.label(app.storage.tab['id']) ``` An automated pytest would be great. But I guess we can't properly simulate duplicating tabs.
- Loading branch information
1 parent
1f0bc6d
commit 526c66b
Showing
4 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters