Skip to content

Fix Android mobile usability (#4991)#6481

Open
021nirav-blip wants to merge 12 commits intosugarlabs:masterfrom
021nirav-blip:solve-issue-website-on-android
Open

Fix Android mobile usability (#4991)#6481
021nirav-blip wants to merge 12 commits intosugarlabs:masterfrom
021nirav-blip:solve-issue-website-on-android

Conversation

@021nirav-blip
Copy link
Copy Markdown
Contributor

@021nirav-blip 021nirav-blip commented Apr 3, 2026

What changed:

  • Help sidebar now collapses with a toggle
  • Responsive breakpoints (768/480/320px)
  • Bigger touch targets (44px min)
  • Click outside help to close
  • Wheel nav scales with screen size
  • Canvas fills full width on mobile
  • Works with both legacy and new help systems

Fixes #4991 — Android navigation was rough, blocks were huge, sidebar never went away.

PR Category

  • Feature
  • Tests
  • Bug Fix
  • Performance
  • Documentation

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

✅ All Jest tests passed! This PR is ready to merge.

@github-actions github-actions bot added bug fix Fixes a bug or incorrect behavior size/L Large: 250-499 lines changed area/javascript Changes to JS source files area/css Changes to CSS/SASS style files area/core Changes to core app entry files labels Apr 3, 2026
@021nirav-blip 021nirav-blip marked this pull request as ready for review April 3, 2026 15:18
@Chaitu7032
Copy link
Copy Markdown
Contributor

Thanks for the Android usability improvements

Requesting changes due to some correctness and maintainability concerns: help visibility mixes inline styles and classes, making state inconsistent. The document-level outside-click handler is added unconditionally and may affect desktop behavior.

  • And also CSS breakpoints overlap and the desktop min-width: 769px override is too broad, potentially forcing help visible unintentionally

And one last

  • Please simplify visibility handling (single mechanism), scope click handling to mobile, refine breakpoints, and add type="button" to the toggle.

background-color: #e0e0e0;
color: black;
border: none;
border-radius: 4px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these spaces?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you think you removed the lines, and added them again with just trailing spaces?

height: 64px;
width: 100%;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.16), 0px 2px 10px 0px rgba(0, 0, 0, 0.12);
box-shadow:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you just re-wrote the same line, don't you think?

height: 28px;
filter: invert(100%);
transition: background-color 0.3s, filter 0.3s;
transition:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again

/* 1. Fit the screen width */
width: 90% !important;
#helpDiv {
/* 1. Fit the screen width */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again

transform: translateX(-50%);
/* Moves it back by half its width to center it */
/* 2. Center Horizontally */
left: 50% !important;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again

@vyagh
Copy link
Copy Markdown
Contributor

vyagh commented Apr 3, 2026

mobile responsiveness is good, but keep the diffs less so its easy to review, thanks!

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

@vyagh Yeah, you're right — sorry about the messy diff. I threw in a bunch of unnecessary formatting (extra spaces, rewriting lines, duplicate comments) that just gets in the way.
I'll send a clean version with only the mobile styles. No cosmetic noise.
Thanks for the catch.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

✅ All Jest tests passed! This PR is ready to merge.

@021nirav-blip 021nirav-blip requested a review from vyagh April 3, 2026 17:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

✅ All Jest tests passed! This PR is ready to merge.

@Chaitu7032
Copy link
Copy Markdown
Contributor

As I check Desktop CSS override is too broad .

  • Avoid forcing display: block !important , it looks aggressive .

Because it can override intended hidden states in desktop layouts. If any feature depends on hiding that widget , this could silently break it.

My suggestion -

  • Scope the rule to a more specific state
  • Or rely on existing state classes instead of overriding them.

Eg:

@media screen and (min-width: 769px) { .widget-window[data-widget-type='help'].is -open { position: relative; transform: none; } }

Rest everything LGTM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

✅ All Jest tests passed! This PR is ready to merge.

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

021nirav-blip commented Apr 4, 2026

@Chaitu7032 Good catch — that desktop override was way too aggressive.

Fixed it:

Before: display: block !important (forced visible everywhere)
After: display: block !important only when .is-open is present

So now it won't break existing hidden states, only affects explicitly opened help widgets. Much safer.
Staged and ready. Thanks for catching that.

@vyagh
Copy link
Copy Markdown
Contributor

vyagh commented Apr 6, 2026

a video attachment would have been great to showcase the improvement.

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

Screencast From 2026-04-06 23-11-42.webm
@vyagh

@021nirav-blip 021nirav-blip requested a review from vyagh April 6, 2026 18:17
@021nirav-blip 021nirav-blip reopened this Apr 9, 2026
What changed:
- Help sidebar now collapses with a toggle
- Responsive breakpoints (768/480/320px)
- Bigger touch targets (44px min)
- Click outside help to close
- Wheel nav scales with screen size
- Canvas fills full width on mobile
- Works with both legacy and new help systems

Fixes sugarlabs#4991 — Android navigation was rough, blocks were huge, sidebar never went away.
- Collapsible help sidebar with toggle
- Responsive breakpoints at 768/480/320px
- Touch targets now 44px min
- Click outside help to close
- Wheel nav scales to screen size
- Canvas full width on mobile
- Supports both legacy and new help systems
- Cleaned up formatting: combined split CSS, removed duplicate comments
- Added css/activities.css to .prettierignore

Fixes sugarlabs#4991 — Android navigation was rough, sidebar never went away, blocks were huge.
What changed:
- Collapsible help sidebar with toggle (mobile only)
- Responsive breakpoints at 768/480/320px
- 44px touch targets, click outside to close (mobile)
- Scaled wheel nav, full-width canvas
- Supports both help systems
- Classes-only visibility (no inline styles)
- Added type=button, fixed overlapping breakpoints
- Added activities.css to .prettierignore

Fixes sugarlabs#4991 (Android navigation issues, always-visible sidebar)

Clean diffs: single visibility mechanism, mobile-only handlers, proper semantics.
@021nirav-blip 021nirav-blip force-pushed the solve-issue-website-on-android branch from b74c74d to 4280e2c Compare April 9, 2026 15:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

Copy link
Copy Markdown
Contributor

@vanshika2720 vanshika2720 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@021nirav-blip There’s still duplicated CSS and some changes look like formatting-only (spacing/trailing spaces).
Please clean up redundant rules and keep the PR focused on the actual mobile usability fix.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

Copy link
Copy Markdown
Contributor

@vanshika2720 vanshika2720 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@021nirav-blip Thanks for working on this.

@Ashutoshx7
Copy link
Copy Markdown
Contributor

image image
Screencast.From.2026-04-09.23-14-40.mp4

the cards stopps adapting after a while and also take a lot of breaking changes

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

hi @Ashutoshx7 can you explain the error to me more clearly

@Ashutoshx7
Copy link
Copy Markdown
Contributor

hi @Ashutoshx7 can you explain the error to me more clearly

Welcome to music blocks card ( 37) break in your changes take closer look

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

@Ashutoshx7
are you refering to the break on 8th sec, on dimension 695px - 1089px, that Welcome to music blocks card move on top of that

@Ashutoshx7
Copy link
Copy Markdown
Contributor

@Ashutoshx7 are you refering to the break on 8th sec, on dimension 695px - 1089px, that Welcome to music blocks card move on top of that

yess

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

@Ashutoshx7
Copy link
Copy Markdown
Contributor

Screencast.From.2026-04-10.02-12-11.mp4

@walter your thoughts ?

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Copy Markdown
Member

I am struggling with this a bit: (1) I don't know what the big ? that appear on the left of the screen is supposed to do. When I click on it, it doesn't seem to do anything; (2) When I click on the help button, it brings up the help widget but I cannot get the widget to dismiss.

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

…inicky—either the widget wouldn't pop up at all, or it'd get stuck and you couldn't close it. It should toggle properly now
@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

@walterbender Got both of these handled. To answer your questions:

The big "?" button is just the mobile toggle. It only shows up when the screen is narrower than 768px because the normal sidebar is too bulky for phones. One tap opens the help, and another tap hides it.

I also fixed the dismissal issues. It'll close now if you hit the button again or if you just tap outside the widget. It should be much less finicky now—give it a try on your phone and let me know if it's still acting up.

@Ashutoshx7
Copy link
Copy Markdown
Contributor

Ashutoshx7 commented Apr 11, 2026

just a quick thought
musicblock is a desktop application
cand so hildren use musicblocks on the laptop

and also i went to the official https://musicblocks.sugarlabs.org/

Screencast.From.2026-04-11.20-02-36.mp4

i feel its optimized enough

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Changes to core app entry files area/css Changes to CSS/SASS style files area/javascript Changes to JS source files bug fix Fixes a bug or incorrect behavior size/L Large: 250-499 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue in opening website on Andriod

6 participants