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

Design consistent UI interface for keyboard+mouse and touch devices #188

Open
brprice opened this issue Dec 7, 2021 · 3 comments
Open
Labels
a11y Accessibility React React issue UI UX UX issue

Comments

@brprice
Copy link
Contributor

brprice commented Dec 7, 2021

We should come up with some system of input controls (click, right-click, keypresses, hover, dragging etc) for our webapp to use, bearing in mind that it should work smoothly for both traditional desktops and also mobile devices. It may be that we want different controls on different devices (e.g. right-click on an actual mouse is an easy gesture, but does not exist as such on touchscreens), though it would be nice if the correspondence was obvious.

There are also potential accessibility concerns here. For example, small targets, swift double-click-ing...

Currently we have the "interactive tree" story in our storybook #167 (which is intended for visualisation during development and has not worried about touch devices). It uses onclick to grow a tree and oncontextmenu ("right-click") to prune. This is nice with a traditional mouse; it works on android (long-press triggers pruning); but does not work on iPad (I cannot trigger pruning; I don't know how easy it would be to "fix" - I have not investigated much). Whilst ok for development visualisation, it is clearly not acceptable in a released product!

The input actions I think we will certainly want are (in terms of traditional desktop input):

  • "click" to select a node or press a button
  • "type" to fill in free-form text boxes
  • "click+drag" to pan a viewport

I don't know whether we will want anything like the following:

  • "scroll wheel" to zoom
  • "right-click"/"middle-click"/"double-click" to trigger additional actions (perhaps a shortcut for "do the obvious thing to this node")
  • "hover" to pop up a tooltip / info box

Of course, there may be other things I have not thought of here!

@brprice brprice added a11y Accessibility UX UX issue UI labels Dec 7, 2021
@brprice
Copy link
Contributor Author

brprice commented Dec 7, 2021

There are clearly a few strands to this issue:

  • What "ideal" interface do we want
  • How feasible are things to implement
  • What is standard practice (even if it is not our ideal, it may be better to be consistent)

I don't think we have a clear picture of any of these questions currently, so this design effort is likely to be a long-running evolutionary effort.

@dhess
Copy link
Member

dhess commented Dec 3, 2022

This has come up again while designing the session list. I’ll elaborate later.

@dhess
Copy link
Member

dhess commented Dec 5, 2022

It seems clear that Apple don’t want developers using long press for apps in mobile Safari:

The latter link, in particular, is on Apple's own bug tracker, was filed in July 2020, and is still marked "NEW" with nobody assigned to it.

Apple’s own web apps don’t even support long press. If you use iCloud Drive on icloud.com, the only way to perform operations like delete & rename on files is to press the selection mode button, select one or more files, and then press the corresponding action icon (trash can, etc.).

This is awful! However, I think it would be unwise to try to work around it. That usually doesn’t end well with Apple products, in my experience.

Therefore, I think we need to ignore long press as an interaction mechanism in Hackworth Codes. This probably means we’ll need more buttons and other explicit/visible UI elements. The downside is that our UI will be a bit more cluttered than I would prefer, but the good news is that features will be more discoverable.

dhess added a commit that referenced this issue Dec 5, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 5, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 5, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 6, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 6, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 6, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 7, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 7, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
dhess added a commit that referenced this issue Dec 7, 2022
These are styled now as cards, with buttons for favoriting &
sharing (not yet hooked up, as the backend lacks support for this).

I have some concerns about how busy the UI is now, but I think this is
better than the alternatives I could come up with, which are:

1. Hide favoriting and sharing behind a long press, which it appears
Apple do not want to support on mobile Safari:
#188 (comment)

2. Single-icon favorite and share buttons, but these are not
particularly informative since they don't have any explanatory text.

I'm open to option 2, as they would take up less screen space and
there would be fewer words on the page, but it's not as discoverable
as the solution implemented here, which includes the words "Favorite"
and "Share" along with the iconic representations. We could support
both, and only display the icons in a more advanced mode, once the
student has some experience using the application.

Note that this commit introduces a new style of button, a sort of
built-in style for cards. I played around with our standard `UIButton`
instead of this new style, as I'm reluctant to add new UI design
language in general; but I think in this case, because we're adding a
major new UI element in the cards themselves, that it makes sense that
they have their own button style. The `UIButton` looked awful in this
context, IMO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility React React issue UI UX UX issue
Projects
None yet
Development

No branches or pull requests

2 participants