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

refactor(app, components, protocol-designer): add touch odd css class #15997

Open
wants to merge 4 commits into
base: edge
Choose a base branch
from

Conversation

shlokamin
Copy link
Member

@shlokamin shlokamin commented Aug 14, 2024

Overview

This PR adds a new CSS class meant to indicate that the window is being rendered on the ODD. it's a bit of a hack, but AFAIK there is no way to configure this in electron and after reading through enough linux graphic threads im convinced configuration on the openembedded side is beyond my capabilities.

This will replace the ODD media query that looked for the specific screen width and height like so:

export const touchscreenMediaQuerySpecs = '(height: 600px) and (width: 1024px)'

Which will make our components safer to use in web environments

Changelog

  • Add CSS class for ODD touch screen

Review requests

Make sure the desktop app ODD app looks like they should

Risk assessment

Medium

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

I think this is a great way to do this, honestly. Sure ideally it would be something we could pass in as a command line flag to electron or something but I'm not sure that's a thing we can do anyway.

I guess the other possibility would be putting it in the electron preload script, if we really really really wanted to keep it out of the app code? I don't think it's that big of a deal though and if we do want to put it there we can change it.

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

this seems like a good approach to me

@shlokamin shlokamin marked this pull request as ready for review September 16, 2024 19:47
@shlokamin shlokamin requested review from a team as code owners September 16, 2024 19:47
@shlokamin shlokamin requested review from brenthagen and removed request for a team September 16, 2024 19:47
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.

3 participants