Repository navigation
Ariadne on a phone: a drag over a picture isn't its click, the password keyboard, pictures kept while hidden - #1364
Merged
Conversation
…rd keyboard, pictures kept while the page is hidden - A widget's on_click (§4.6) is a tap in ImGui, as an item group's is: the button released over the item it went down on, not dragged past the drag threshold. It was IsItemClicked, the press, so a finger landing on a feed's picture or video to scroll opened the viewer (or paused the video) before TouchScroll made the drag a scroll. - The phone keyboard's hidden input is type=password while ImGui's active field is a password field (input_text with password: true). As type=text with autocomplete off, a phone keyboard still showed the password in its suggestion strip and learned it. What was typed is cleared from it when its type changes and when the keyboard closes; it used to stay in the page. - The picture cache counts idle in drawing time, not the wall's: the clock moves with the time between two requests, at most a second at a time. A hidden browser tab draws about once a minute, so every frame came more than idle_seconds (30) after the last, and each dropped every other picture and fetched it again (and once more on return to the page). A failure's retry stays on the wall. Tests: cvcgl_imgui_group_click (a widget's on_click: the press runs nothing, a tap runs it, a press that drags or went down elsewhere doesn't); ariadne_media_test's MediaCache.APauseInDrawingDropsNothing.
…ictures kept by drawing time
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three bugs in nicotina on a phone (arigl-web 4.0.0), all in libcvc:
A drag that starts on a picture or video opens it.
ImGuiBackend::item_clickedwasImGui::IsItemClicked(), which fires on the press. A widget's ownon_click(nicotina's picture and video tiles) ran before TouchScroll took the drag. Item groups were already a tap (end_item_group). Now a widget'son_clickis a tap too: the release is over the item, the press was inside it, and the pointer moved no more thanMouseDragThreshold.The password shows in the phone keyboard's suggestions. ImGuiOverlay's hidden
<input>(the one the system keyboard types into) was alwaystype=text. While the password field was active it held the password, and it still held it after sign-in. NowPlatform_SetImeDataFnreadsInputTextState.Flags & ImGuiInputTextFlags_Passwordfor the active field. The input becomestype=passwordfor a password field andtextotherwise, and it is emptied on each type change and when it closes.Pictures are fetched again after the page is hidden.
ImageCachedropped a picture that hadn't been asked for in 30 s of wall time. A hidden tab draws about once a minute, so every hidden frame dropped every other picture and fetched it again (38 refetches per picture over ~40 min in a stub log). Retention now runs on a drawing clock that advances at most 1 s between requests, so a pause in drawing drops nothing. Failed fetches still retry on wall time, since that's how the jobs stamp them.Tests:
cvcgl_imgui_group_clickcovers a widget with its ownon_click:ariadne_media_testMediaCache.APauseInDrawingDropsNothing:docs/ARIADNE.md:on_clickis a tap;Verification:
Input.insertText), against nicotina main and the stub server:type=passwordwith the password field active, andtextwith the username field;textand emptied.Not covered: a real phone. The feed's glide is separate.