Skip to content

feat(graph): Add responsive design for mobile and tablet screens#127

Open
richarddushime wants to merge 3 commits intoIGOR-bioDGPs:masterfrom
richarddushime:responsiveness
Open

feat(graph): Add responsive design for mobile and tablet screens#127
richarddushime wants to merge 3 commits intoIGOR-bioDGPs:masterfrom
richarddushime:responsiveness

Conversation

@richarddushime
Copy link

Makes the graph visualization page responsive for mobile, tablet, and large desktop screens.

Fixes a sub issue of #6

Breakpoints

  • Mobile (≤600px): 70% viewport height, compact buttons, smaller fonts (11-16px)
  • Tablet (≤900px): 80% viewport height, moderate sizing (13px fonts)
  • Desktop (≥1200px): 90% viewport height, larger fonts (16-18px)

@caggursoy
Copy link
Member

Hi @richarddushime this looks like a nice solution! I'll test it very soon and then add my comments here.

@richarddushime
Copy link
Author

NB: When testing different screen sizes via the Browser DevTools (Inspector), please perform a page refresh after switching devices/dimensions.
A quick refresh ensures the graph scales and centers perfectly for the newly selected device.

@caggursoy
Copy link
Member

And this manual refresh (or properly auto-resize) thing is something that I want to automate very much soon too... 😄

Enhance graph/graph.html with mobile-friendly interactions: extract shared context-action helpers (handleBackgroundContextAction, handleNodeContextAction); add a 'tap' handler on nodes to emulate left-click behavior on touch devices; implement long-press (600ms) handlers for nodes and background to trigger node/context actions as an alternative to right-click; cancel long-press on tapend or drag. Also adjust background-image handling and tooltip cleanup to support these flows.
@caggursoy
Copy link
Member

I liked your overall changes :)

And now added a few so that your changes are reflected in the mobile version: long press instead of right clicks. It still needs some work, for example making sure long press only exists if the device is a mobile one etc.

Also we need to have extensive tests on this! So @helenahartmann & @alkastrinogiannis I guess this will be in our near-future pipeline! 🦞

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants