Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile device accessibility #121

Merged
merged 37 commits into from
Oct 8, 2024
Merged

Mobile device accessibility #121

merged 37 commits into from
Oct 8, 2024

Conversation

TeunHuijben
Copy link
Collaborator

@TeunHuijben TeunHuijben commented Sep 30, 2024

This PR implements accessibility functionalities for mobile devices. The app detects what kind of device is used (desktop/tablet/phone) and changes the layout and functionalities accordingly.

Implemented:

  • desktop: full functionalities
  • tablet: only the third selector (configurable sphere) is enabled, because the others require shift/control+functionality.
    • added a physical select cells button for selection (since shift+click does not work
    • shift+click would still work if the tablet had a keyboard connected
    • implemented scale slider to adjust the size of the selector sphere. This will work especially nice in combination with PR Preview the point within cursor before selecting them #119
    • user gets warning when selecting a disabled selector
    • I added the option that you can deselect all selectors, to remove the orbit controls from the Scene (works on all three platforms though)
  • phone: only visualize the scene and the time-slider, the entire left-bar with functionalities is hidden (because screen is too small to work properly)

iPad video:

app_iPad_Oct2_v2.MP4

iPhone video:

app_iPhone_Oct1.mp4

(Sorry for the overload of pushes to this PR. The build-in Vercel preview was the easiest way to quickly check the compatibility with iPhone/iPad :) )

Copy link

vercel bot commented Sep 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
points-web-viewer ✅ Ready (Inspect) Visit Preview Oct 8, 2024 10:56pm

Copy link
Member

@kyleawayan kyleawayan left a comment

Choose a reason for hiding this comment

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

Works well on my iPhone and iPad!

Maybe a suggestion for iPhone, can we add a note somewhere that signifies there are more features on the desktop version?

Another suggestion for iPhone, can we run like a demo of the tracks? Just something that could show something cool or a general overview? That way we can show some tracks even if we don't have space for explicitly selecting them?

src/components/App.tsx Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
@TeunHuijben
Copy link
Collaborator Author

Thanks @kyleawayan! I added a pop-up window when opening the viewer on a phone, and will make an issue for the other suggestion

@aganders3
Copy link
Collaborator

Looks good! Pretty neat to see this work on mobile even in a limited capacity. Is there a way to disable (gray out) the unavailable selection modes as well?

@TeunHuijben
Copy link
Collaborator Author

Hi @aganders3, yes I tried to disable the first two selection modes (when using a tablet), but this was not possible, to my knowledge. The problem is that SegmentedControl from czi-sds has a SingleButtonDefinition that doesn't include disable (https://github.com/chanzuckerberg/sci-components/blob/d7be2ca33b7d785330ed7423e941cc1892921290/packages/components/src/core/SegmentedControl/index.tsx). And its supergroup ToggleButtonGroupProps from mui/materials, doesn't have it either. So this was the solution that works for now

@TeunHuijben TeunHuijben merged commit ec602b1 into main Oct 8, 2024
2 checks passed
@TeunHuijben TeunHuijben deleted the mobile branch October 8, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants