Commit Graph

68 Commits

Author SHA1 Message Date
Christoph Scholz
e0088a45da fix emoji-picker for use_system_emojis==false 2020-11-18 17:22:14 +01:00
JC Brand
00466cd550 Let the converse-loaded event conform to the CustomEvent spec
https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
2020-10-26 13:09:15 +01:00
JC Brand
4252a17f62 Fixes #1642 Add option to hide participant list by default
In the process, turn it into a component
2020-10-23 21:18:05 +02:00
Xavi
15f5b185c3
Fix message reorder issue after edit (#2300)
* keep message in place after edition by assigning previous message original timestamp
* update time displayed to keep current behaviour
* add test to check a message remains in the same position of the history after being edited
* briefly describe pr changes in changelog
2020-10-23 15:07:56 +02:00
Xavi
5a4fbe12a9
Allow getHats method to be overriden (#2308) 2020-10-23 14:09:30 +02:00
Xavi
042aa3a73e
Create hats from vcard conditionally (#2285)
* allow the use of MUC affiliation, MUC role, and VCard roles as hats
* update setting documentation
* remove filter from VCard roles
* update naming and documentation to make explicit the use of XEP-317 Hats
* include muc_hats config option update to changelog
2020-10-15 09:51:19 +02:00
JC Brand
383b6a27c3 Render the brand heading as a component 2020-10-02 11:44:28 +02:00
JC Brand
6d9752645f Replace lodash methods with native ones
filter
find
has
isEmpty
isString
isUndefined
noop
reject
uniq
2020-10-01 12:56:00 +02:00
JC Brand
65ad33ec81 Let message component listen for changes...
and render directly from those

Instead of doing it higher up in the chat view (which requires more
function calls and iterating through all messages).
2020-09-27 10:31:53 +02:00
JC Brand
4ebd3caf48 element: Call super.disconnectedCallback 2020-09-27 10:31:53 +02:00
JC Brand
3fc6f7fa23 Fixes #1924 2020-09-25 18:46:45 +02:00
JC Brand
bbf4c08ffd Prevent emoji from being inserted twice 2020-09-17 13:50:52 +02:00
JC Brand
0a82a177c4 OMEMO: ensure reflected encrypted MUC messages are identified 2020-09-17 10:37:09 +02:00
JC Brand
2c042cc3fa Fixes #2184: Headless build relies on locale directory
Removed Jed from the headless build and instead let `__` call sprintf.

It's now up to downstream users for `@converse/headless` to decide
whether they want i18n support for the few translatable strings in that package
and to implement it themselves.
2020-09-10 08:55:38 +02:00
Xavi Ferrer
cc458e8d3b use composedPath() instead as it is standarized and cross-browser suported 2020-09-07 15:51:34 +02:00
Xavi Ferrer
37662e8dc1 prevent dropdown from being closed after event retargeting when bubbling out of a shadowRoot 2020-09-07 15:51:34 +02:00
JC Brand
4e7b29e417 Make sure initialize can be awaited...
before `converse.initialize` has been called

In the process, remove other "core" promises. There is no core or
community plugins code awaiting on them and since it's possible to
call `converse.initialize` twice, I'm not sure it makes sense to even have them.

Also removed unused error class IllegalMessage.
2020-09-03 17:07:44 +02:00
JC Brand
c41bdac6c8 Some work on componentizing the minimized chats UI 2020-09-03 13:06:17 +02:00
JC Brand
d5c93eb024 Create converse-root custom element
This element can be used to declaratively insert Converse into the DOM.

You can put `<converse-root>` into the DOM (e.g. by rendering it inside
a React component) before or afer Converse has loaded and/or has been
initialized.
2020-09-03 13:06:17 +02:00
JC Brand
7cbb1b23b2 When opening a dropdown, don't prevent other dropdowns from closing 2020-08-18 15:09:37 +02:00
JC Brand
306b9fdd71 Updates #2193
Also remove top-level i18n declarations in components
2020-08-17 09:00:53 +02:00
JC Brand
fbcd7cf737 Emoji picker: Make sure events persist across add/remove from DOM 2020-08-14 15:07:15 +02:00
JC Brand
78bf07ecff Make sure the registry is loaded before registering custom elements 2020-08-12 18:01:23 +02:00
JC Brand
6a6d080679 Open images in a modal 2020-07-14 15:45:16 +02:00
JC Brand
8f6b1f9049 Fix help menu icon colour and let it scroll 2020-07-13 11:17:29 +02:00
JC Brand
e6d8634194 Emoji picker: properly insert emoji upon click 2020-07-13 10:59:57 +02:00
JC Brand
756a85fb53 Emoji picker: make sure search results get properly updated 2020-07-13 09:55:01 +02:00
JC Brand
43ccc09cf2 Don't assume that converse is a global 2020-07-10 14:20:02 +02:00
JC Brand
cca5c17ccb Fix failing test due to timing issue 2020-07-10 12:38:52 +02:00
JC Brand
54ffd90087 Make sure the emoji picker is focused...
the first time it's opened
2020-07-09 21:21:17 +02:00
JC Brand
45ebc70bfe Let escape close the emoji picker 2020-07-09 21:14:13 +02:00
JC Brand
8943609d10 Refactor the body directive
Changes how rich message markup is generated and kept track of.
We now have a MessageText class which subclasses String and which keeps
track of the rich markup associated with the message.
2020-07-09 20:50:25 +02:00
JC Brand
51ad0e3708 Fix toggling of the spoiler form 2020-07-08 11:33:06 +02:00
JC Brand
4bf823f6cd Fix show/hide of spoilers 2020-07-08 10:22:20 +02:00
JC Brand
c3d6b64f4b Turn the chat toolbar into a component
- Declaratively render the emoji picker dropup
- Got rid of converse-emoji-views
- Adapt OMEMO to the new buttons stuff
- Make emojis json global, to try and speed up tests
- omemo: Move functions to the top of the module
2020-07-08 10:17:06 +02:00
Ariel Fuggini
82357f7d97 Created a web component registry and exports components as modules in order to facilitate their customization 2020-07-07 11:44:34 +02:00
JC Brand
eafa1573e7 Prefix the icon anchors to make them more unique 2020-07-02 11:56:37 +02:00
JC Brand
f4f183bc46 Rendeer SVG icons inline
to overcome cross-site restrictions on using the `use` attribute of the `<svg>` element.
2020-07-02 01:21:40 +02:00
JC Brand
2cb1af3dea Assign the Skeletor Events API to CustomElement
So that components can use `listenTo`
2020-07-01 09:25:14 +02:00
JC Brand
f8efd94249 Don't smooth-scroll upon first appearance of the chat
it's annoying in overlayed view-mode where the user might be navigating
around the site.

Fixes #2091
2020-06-30 14:11:53 +02:00
JC Brand
22b2875b52 emoji-picker: Move picker content into another component
to avoid re-rendering them when non-relevant properties change
2020-06-25 14:31:01 +02:00
JC Brand
b7a40dad41 Add a title attribute to emojis in messages
so that you can see the shortname when you hover your mouse over an emoji.
2020-06-25 11:19:07 +02:00
JC Brand
b3e34a0636 Turn the emoji picker into a web component 2020-06-25 10:27:29 +02:00
JC Brand
0cc088a523 Use the assets_path setting for the icons sprite 2020-06-18 13:45:03 +02:00
Ariel Fuggini
bab71485ca Fixed bug 2020-06-15 14:35:42 +02:00
JC Brand
de583cbd32 Don't nest chat-msg__txt inside converse-chat-message-body
instead just set the classes directly on the custom element

As far as I can tell, this fixes #1346 (or it was fixed already)
2020-06-12 14:05:33 +02:00
JC Brand
59a5acf249 Fixes #2064 (for real this time) 2020-06-11 17:29:44 +02:00
JC Brand
80c955f267 Fix "retry" feature for message errors.
By registering a one-time event handler for a unique event name
2020-06-11 17:29:44 +02:00
JC Brand
abec9bc39e Fixes #2064 and move message markup into template
After some back-and-forth, I think it's still better to keep markup in
templates (instead of having them directly inside the components)
becaues it makes it easier for people to modify Converse.js (at the
expense of some developer ergonomics).
2020-06-11 15:27:45 +02:00
JC Brand
c2c1db587f Create a component which renders message actions in a dropdown 2020-06-05 16:02:58 +02:00