René's URL Explorer Experiment


Title: Focus: defer focus border until first directional navigation by bitcoin3us · Pull Request #173 · MicroPythonOS/MicroPythonOS · GitHub

Open Graph Title: Focus: defer focus border until first directional navigation by bitcoin3us · Pull Request #173 · MicroPythonOS/MicroPythonOS

X Title: Focus: defer focus border until first directional navigation by bitcoin3us · Pull Request #173 · MicroPythonOS/MicroPythonOS

Description: Make add_focus_border() (mpos/ui/focus.py) skip the focus ring on pointer/touch devices. Why add_focus_border() draws a focus highlight and adds the widget to the default focus group — a navigation aid for keypad/encoder devices, where it shows which widget the moving highlight is on. On a pointer/touch UI there is no moving highlight: the ring only appears after a tap and then lingers around the tapped widget. Concretely, this is why the Lightning Piggy balance shows a gold rectangle after you tap it (the balance is add_focus_border-ed in 0.6.0, and tapping it cycles the denomination). On a touchscreen that ring is visual noise, not a cue. What def add_focus_border(widget, ...): from .input_manager import InputManager if InputManager.has_pointer(): return ... Reuses the existing InputManager.has_pointer() (no new detection). Full no-op on touch: skips both the FOCUSED/DEFOCUSED border callbacks and the focus-group registration. Widgets remain interactive through their own CLICKABLE flag / click handlers, which are independent of the focus group. Keypad/encoder devices are unchanged — has_pointer() is False there, so the border is added exactly as before. Hybrid devices (both touch and a keypad) would also skip the ring; that edge case can be refined later if needed — flagging it explicitly rather than silently. Testing tests/test_focus_border_touch.py added: asserts add_focus_border() registers no callbacks when InputManager.has_pointer() is patched True. Verified the logic in a CPython stub harness (lvgl + InputManager stubbed): touch present → 0 callbacks (no-op); no pointer → 2 callbacks registered. Confirmed InputManager.has_pointer() returns True on a real touchscreen device (ESP32-S3), so the guard fires there. ⚠️ I did not run ./tests/unittest.sh locally — it needs a freshly built desktop binary with this change and my local build is stale. Please run ./tests/unittest.sh tests/test_focus_border_touch.py in CI / on a current build. Merge checklist CHANGELOG: ✅ added under Future release → Frameworks App version / MANIFEST: n/a (framework change) MAINTAINERS.md / boards: n/a Settings migration: n/a Unit tests: ✅ added (no-op path); see testing caveat above Frameworks docs (docs.micropythonos.com): not updated — add_focus_border behavior is now device-conditional; happy to add a note if there is a docs page for it.

Open Graph Description: Make add_focus_border() (mpos/ui/focus.py) skip the focus ring on pointer/touch devices. Why add_focus_border() draws a focus highlight and adds the widget to the default focus group — a navigation...

X Description: Make add_focus_border() (mpos/ui/focus.py) skip the focus ring on pointer/touch devices. Why add_focus_border() draws a focus highlight and adds the widget to the default focus group — a navigation...

Opengraph URL: https://github.com/MicroPythonOS/MicroPythonOS/pull/173

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:532c37ce-b8b9-c63d-7083-2d62b70ecdd1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC96E:1694AE:12FDC6C:19FE35F:6A5219DC
html-safe-nonce8a4595841a3644248127b83c7ae658af971a82f62ca6fa95663295a8df750ca4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTZFOjE2OTRBRToxMkZEQzZDOjE5RkUzNUY6NkE1MjE5REMiLCJ2aXNpdG9yX2lkIjoiMzA4MDk4MzA0OTEyODc3ODIwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7f53bf51b4eca3267fe0b2c5cf1bcf8a965f6fe7a445d52e4388939aec769d8
hovercard-subject-tagpull_request:3938026426
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
twitter:imagehttps://avatars.githubusercontent.com/u/115934595?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/115934595?s=400&v=4
og:image:altMake add_focus_border() (mpos/ui/focus.py) skip the focus ring on pointer/touch devices. Why add_focus_border() draws a focus highlight and adds the widget to the default focus group — a navigation...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/MicroPythonOS/MicroPythonOS git https://github.com/MicroPythonOS/MicroPythonOS.git
octolytics-dimension-user_id213598128
octolytics-dimension-user_loginMicroPythonOS
octolytics-dimension-repository_id975472483
octolytics-dimension-repository_nwoMicroPythonOS/MicroPythonOS
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id975472483
octolytics-dimension-repository_network_root_nwoMicroPythonOS/MicroPythonOS
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMicroPythonOS%2FMicroPythonOS%2Fpull%2F173%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FMicroPythonOS%2FMicroPythonOS%2Fpull%2F173%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=MicroPythonOS%2FMicroPythonOS
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Reloadhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
MicroPythonOS https://github.com/MicroPythonOS
MicroPythonOShttps://github.com/MicroPythonOS/MicroPythonOS
Notifications https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Fork 83 https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Star 737 https://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS
Code https://github.com/MicroPythonOS/MicroPythonOS
Issues 23 https://github.com/MicroPythonOS/MicroPythonOS/issues
Pull requests 8 https://github.com/MicroPythonOS/MicroPythonOS/pulls
Discussions https://github.com/MicroPythonOS/MicroPythonOS/discussions
Actions https://github.com/MicroPythonOS/MicroPythonOS/actions
Projects https://github.com/MicroPythonOS/MicroPythonOS/projects
Security and quality 0 https://github.com/MicroPythonOS/MicroPythonOS/security
Insights https://github.com/MicroPythonOS/MicroPythonOS/pulse
Code https://github.com/MicroPythonOS/MicroPythonOS
Issues https://github.com/MicroPythonOS/MicroPythonOS/issues
Pull requests https://github.com/MicroPythonOS/MicroPythonOS/pulls
Discussions https://github.com/MicroPythonOS/MicroPythonOS/discussions
Actions https://github.com/MicroPythonOS/MicroPythonOS/actions
Projects https://github.com/MicroPythonOS/MicroPythonOS/projects
Security and quality https://github.com/MicroPythonOS/MicroPythonOS/security
Insights https://github.com/MicroPythonOS/MicroPythonOS/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FMicroPythonOS%2FMicroPythonOS%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FMicroPythonOS%2FMicroPythonOS%2Fissues%2Fnew%2Fchoose
ThomasFarstrikehttps://github.com/ThomasFarstrike
MicroPythonOS:mainhttps://github.com/MicroPythonOS/MicroPythonOS/tree/main
bitcoin3us:fix/touch-aware-focus-borderhttps://github.com/bitcoin3us/MicroPythonOS/tree/fix/touch-aware-focus-border
Conversation 2 https://github.com/MicroPythonOS/MicroPythonOS/pull/173
Commits 1 https://github.com/MicroPythonOS/MicroPythonOS/pull/173/commits
Checks 6 https://github.com/MicroPythonOS/MicroPythonOS/pull/173/checks
Files changed https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Focus: defer focus border until first directional navigation https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#top
Show all changes 1 commit https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
0af5dcc Focus: defer focus border until first directional navigation bitcoin3us Jun 26, 2026 https://github.com/MicroPythonOS/MicroPythonOS/pull/173/commits/0af5dcc19726e7afc8d1819344285855c96853de
Clear filters https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
CHANGELOG.md https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
focus.py https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-9b13011163098668b4471a9ffcbb02d295755794ed44a345cbe7bc8931d93dcc
focus_direction.py https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-ad959fbd2c2fea26d187b171df9ff5087752aba679355693be6af0a915bdf92e
test_focus_border_deferred.py https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-b487d85d098e491a58a15d15e9e12aaf76faeeae91e0bd91a9c7d5031ee7a487
CHANGELOG.mdhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/bitcoin3us/MicroPythonOS/blob/0af5dcc19726e7afc8d1819344285855c96853de/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
internal_filesystem/lib/mpos/ui/focus.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-9b13011163098668b4471a9ffcbb02d295755794ed44a345cbe7bc8931d93dcc
View file https://github.com/bitcoin3us/MicroPythonOS/blob/0af5dcc19726e7afc8d1819344285855c96853de/internal_filesystem/lib/mpos/ui/focus.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-9b13011163098668b4471a9ffcbb02d295755794ed44a345cbe7bc8931d93dcc
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-9b13011163098668b4471a9ffcbb02d295755794ed44a345cbe7bc8931d93dcc
internal_filesystem/lib/mpos/ui/focus_direction.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-ad959fbd2c2fea26d187b171df9ff5087752aba679355693be6af0a915bdf92e
View file https://github.com/bitcoin3us/MicroPythonOS/blob/0af5dcc19726e7afc8d1819344285855c96853de/internal_filesystem/lib/mpos/ui/focus_direction.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/{{ revealButtonHref }}
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-ad959fbd2c2fea26d187b171df9ff5087752aba679355693be6af0a915bdf92e
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-ad959fbd2c2fea26d187b171df9ff5087752aba679355693be6af0a915bdf92e
tests/test_focus_border_deferred.pyhttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files#diff-b487d85d098e491a58a15d15e9e12aaf76faeeae91e0bd91a9c7d5031ee7a487
View file https://github.com/bitcoin3us/MicroPythonOS/blob/0af5dcc19726e7afc8d1819344285855c96853de/tests/test_focus_border_deferred.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/MicroPythonOS/MicroPythonOS/pull/173/{{ revealButtonHref }}
Please reload this pagehttps://github.com/MicroPythonOS/MicroPythonOS/pull/173/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.