infor-design / enterprise-ng

Angular wrappers for IDS Enterprise components
Apache License 2.0
57 stars 83 forks source link

Tree: Add dblclick events #1581

Open FinleyCheng opened 11 months ago

FinleyCheng commented 11 months ago

Is your feature request related to a problem? Please describe. We want to implement the behavior to open folders by double clicking in our file browser component. We have two mode, in grid view mode, we can implement the behavior with SohoDataGridComponent. However, in the list mode, we can't implement the behavior with SohoTreeComponent as the component doesn't export double click event.

Describe the solution you'd like Provide a double click event for SohoTreeComponent (and angular handler)

Describe alternatives you've considered Not sure if there any walkaround to implement the file browser behavior or examples of file browser to do navigation in folders.

Additional context By the way, I sent request to join IDS Enterprise Development group but not approved, I wonder how to touch with you in other ways.

tmcconechy commented 11 months ago

@FinleyCheng i dont fully understand this issue. Maybe it will help to follow the instructions on issues https://github.com/infor-design/enterprise/issues/new?assignees=&labels=&projects=&template=bug_report.md and submit it as steps to reproduce.

I guess your looking at the dblclick event on the tree? And it doesnt work? But unsure since you mention datagrid too. If your trying to build a file explorer i would suggest using the tree not the datagrid.

And i dont see why you would have a double click in a file explorer it isnt a great interaction thats familiar by most users.

Example like a file explorer https://main-enterprise.demo.design.infor.com/components/page-patterns/example-tree-detail.html See also the new components one user is building something simalar to a file type explorer you may want to watch for https://github.com/infor-design/enterprise-wc/issues?q=is%3Aissue+is%3Aopen+label%3A%22team%3A+landmark%22

FinleyCheng commented 11 months ago

@tmcconechy Thanks, you are right, I'm looking at the dblclick event on the tree. By design, we support different views(list/grid) of files in file explorer.
image

Maybe double click isn't a great interaction in Web UI file explorer but we try to keep consistent with the file browser behavior in our on-prem product. Customers may more familiar with that.

I think the issue I created is not to report a bug but request the feature to support double click event in SohoTreeComponent.

tmcconechy commented 11 months ago

ok @FinleyCheng got it. I think we can provide a dblclick event. I clarified the issue a bit

FinleyCheng commented 11 months ago

@tmcconechy Thanks a lot.

talkaboutdesign commented 10 months ago

@FinleyCheng @tmcconechy Double-click is not a pattern we want to support, nor is it a good idea in practice. Some of our components over time added that feature, but this is not a good idea for a number of reasons.

The double-click pattern on web interfaces is generally avoided because it contradicts web standards, poses accessibility challenges, is unsuitable for mobile use, increases the chance of user error, slows down interaction, complicates development, and lacks clarity and immediate feedback.

The standard interaction pattern for web browsers and websites is a single click. Users expect a single click to initiate actions like opening links or buttons. Double-clicking is more common in desktop applications, so using it on the web breaks user expectations and can lead to confusion.

Double-clicking can be challenging for users with motor impairments or those using assistive technologies. It requires a level of dexterity and speed that may not be possible for all users, making the website less accessible.

On touch devices, like smartphones and tablets, the concept of double-clicking does not translate well. Users of these devices expect to tap (equivalent to a single click) to interact with content, so a double-click requirement can make the site unusable on mobile devices. It also increases the likelihood of accidental actions or misunderstandings about how the interface works. Users might double-click when a single click is needed, or vice versa, leading to frustration or unintended actions.