discourse/plugins/chat
Joffrey JAFFEUX 6cd4b8de6d
FIX: long press chat message test failure (#23791)
This commit brings two fixes.

- increase the delay to trigger the action menu

- check of user activation before using vibrate:

https://developer.mozilla.org/en-US/docs/Glossary/Sticky_activation
https://developer.mozilla.org/en-US/docs/Web/Security/User_activation
https://developer.mozilla.org/en-US/docs/Web/API/UserActivation/hasBeenActive

> Sticky activation is a window state that indicates a user has pressed a button, moved a mouse, used a menu, or performed some other user interaction. It is not reset after it has been set initially (unlike transient activation).
> APIs that require sticky activation (not exhaustive):
> - Navigator.vibrate()
> - VirtualKeyboard.show()
> - Autoplay of Media and Web Audio APIs (in particular for AudioContexts).


Before this fix, we could end up with this error in the console in tests:

> Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded 

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-10-05 10:16:13 +02:00
..
app DEV: enforces system user membership (#23771) 2023-10-04 17:03:23 +02:00
assets DEV: removes dead code (#23772) 2023-10-04 20:02:57 +02:00
config UX: enhances chat copy features (#23770) 2023-10-04 16:14:37 +02:00
db FEATURE: implements user based sidebar mode (#23078) 2023-08-18 20:33:07 +02:00
lib FEATURE: add outgoing web hooks for Chat messages 2023-09-13 17:31:42 -03:00
public
spec FIX: long press chat message test failure (#23791) 2023-10-05 10:16:13 +02:00
test/javascripts DEV: Modernize chat getOwner usage (#23671) 2023-09-26 18:05:34 +01:00
plugin.rb UX: enhances chat copy features (#23770) 2023-10-04 16:14:37 +02:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.