Commit Graph

45 Commits

Author SHA1 Message Date
JC Brand
15c10376b0 Rename all templates to camelCase
To conform with naming conventions regarding functions, which the
templates are.
2023-02-15 14:29:07 +01:00
JC Brand
040d5bae9d Rename CSS vars to try and get some more consistency 2022-10-30 16:51:15 +01:00
JC Brand
bd60861c1e Don't import plugins' index.js file from other plugins
Importing a plugin's `index.js` file from other plugins means that it's no
longer possible to remove that plugin by removing it from `src/converse.js`.

Instead, all plugins need to be imported in proper order from
`src/headless/headless.js` and `src/converse.js`.

Updates #3026
2022-09-20 14:48:20 +02:00
JC Brand
927add0707 Wrap requestUpdate in an arrow function
Otherwise parameters from the event handler might be passed in to it,
causing potential weirdness.
2022-09-16 10:26:21 +02:00
JC Brand
5d3da20bd9 Remove/update old comments 2022-07-03 13:36:15 +02:00
JC Brand
ba7c6d7a50 Let HeadlinesHeading use CustomElement 2022-06-19 13:03:06 +02:00
JC Brand
858a6051ac Refactoring of the headlines plugins
- Move template to relevant plugin
- Turn ElementView into CustomElement
- Use the terminology "Headlines Feed" instead of "Headlines Box"
- Break the `converse-headlines` plugin up into multiple files
- Fix CSS styling for headlines feeds for the Dracula theme
2022-05-13 16:49:45 +02:00
JC Brand
ab7e879261 Don't automatically convert OpenStreetMap URLs into geo: URIs in sent messages
Updates #1850 and #2914
2022-05-13 10:14:31 +02:00
JC Brand
6b1845ff39 Release 9.1.0 2022-04-02 19:31:37 +02:00
JC Brand
ca20f687bf minimize: initialize chat via event instead of override 2022-02-19 23:10:17 +01:00
JC Brand
bbef09346a Various CSS fixes and use converse-icon for nav button 2022-02-19 23:09:39 +01:00
JC Brand
1c8085f00e CSS: Set modal header color for error alerts
Also fix various element colors for Dracula theme
2022-02-19 21:32:25 +01:00
JC Brand
3cfdf4c946 Fix trimming of chats in overlayed view mode 2021-10-14 17:49:20 +02:00
JC Brand
84c6a0039c Fix embedded, singleton mode.
It's now necessary to add a `converse-root` element in the DOM where you
want Converse to render (previously it was any element with the id
`#conversejs`).

Also, turned `converse-chats` element into a Lit element and re-render
`converse-root` and `converse-chats` when the `view-mode` or `singleton`
settings change. This is a step towards being able to change the view
mode on the fly and have the entire chat re-render appropriately.

Fixes #2647
2021-09-24 11:53:49 +02:00
JC Brand
48f37aa1c0 Call initialize in CustomElement's connectedCallback method 2021-09-23 14:25:42 +02:00
JC Brand
f40a8f69ae Don't show minimized chats when logged out 2021-09-06 22:08:36 +02:00
JC Brand
6827e21df1 Fix race conditions in tests 2021-08-31 11:23:49 +02:00
JC Brand
0c0af2d00b Fix the minimized chats toggle
Clicking didn't make the minimized chats appear.
Also turn it into a Lit component
2021-08-29 00:15:45 +02:00
JC Brand
60826ac6c6 Move functions out of core.js 2021-07-19 16:40:40 +02:00
JC Brand
6665bef76c Fix failing tests
Handle missing message model (happens during tests)
2021-06-29 16:00:10 +02:00
JC Brand
335a491e0d Stop using the Jasmine "done" callback 2021-06-29 15:59:49 +02:00
JC Brand
b6f2662ad7 Set 'scrolled' flag on model.ui
This prevents it from being persisted across page loads and makes more
sense logically.

Also move markScrolled to utils and MUC unread messages indicator to bottom panel.
2021-06-17 11:39:20 +02:00
JC Brand
68f0be996f Let chats be closed by calling close on the models
Instead of on the views/components.

We still have `close` methods on the components, but they are just
event handlers and not external API methods to be called by other code.
Instead `close` should be called on the model.
2021-06-15 09:59:40 +02:00
JC Brand
9fb92080f2 Get rid of the APIs to fetch chat views
This is largely a leftover from the Backbone.View days and makes less
sense now that the UI is componentized.

Ideally we don't want to call commands on the "views themselves, instead
we should be working on the the models and let the "views" update
themselves automatically.

Also, given that the `jid` attribute on the chat views might change,
especially when rendered declaratively in other frameworks like React,
a view might not be available at times where we previously might have
expected it to be (since it's been repurposed for a different JID).
2021-06-15 09:59:40 +02:00
JC Brand
58d96c8594 Use intersection observer to remember scrolling position 2021-06-03 18:24:55 +02:00
JC Brand
279a3c3413 Add saveScrollPosition method on ChatContent 2021-06-03 15:32:39 +02:00
JC Brand
fdc81fa4ea Use .conversejs instead of .converse-root
as the class that designates standalone Converse components.
2021-05-06 12:21:35 +02:00
JC Brand
9c11e0dc32 Use .converse-root class instead of #conversejs id 2021-04-30 17:36:42 +02:00
Shaun Wu
9ea8653ef7 Upgrade to Webpack 3
Had to make various other changes due to incompatibilities.

- Use the new `lit` package instead of `lit-html` or `lit-element`
- Drop `haunted` since it breaks the rules by specifying `type: module`
  but then doesn't import with file extensions
- Use Sass Dart instead of node-sass (fixes #2445)
- Upgrade Karma
2021-04-30 13:50:50 +02:00
JC Brand
57ccf4c20e Batched writes to IndexedDB
- Update to the latest @converse/skeletor (which uses mergebounce to batch writes)
- Flush storage before logging out
- Flush when reloading the tab
- Create initStorage method
2021-04-28 16:53:50 +02:00
JC Brand
7b49296a24 Bugfix. Avoid creating an undefined store 2021-04-22 14:47:01 +02:00
JC Brand
7b7ec45db8 Move disco plugin into folder and import lodash utilities separately 2021-04-21 11:03:22 +02:00
JC Brand
a67603f689 Move various tests to plugin folders 2021-04-11 21:12:37 +02:00
JC Brand
f897596215 Move files around to try and create some consistency and order 2021-03-24 12:41:17 +01:00
JC Brand
1b91d9b69e Move roster, bookmarks and minimize styles to plugin folders 2021-03-19 11:53:22 +01:00
JC Brand
d8daedea0d Render the MUC view component declaratively 2021-03-15 12:34:56 +01:00
JC Brand
4646956922 Don't render hidden chats 2021-03-11 13:05:03 +01:00
JC Brand
4ca30c4b93 Create converse-muc-chatarea component 2021-03-11 10:26:09 +01:00
JC Brand
22b6b4b502 minchats: Use utility methods instead of mixins
Various fixes to chat minimization
2021-02-09 15:48:21 +01:00
JC Brand
05c00c5e1c Call minimize on the model
Fix minimizing by listening to change event

Fixes around showing/hiding and minimizing/maximizing

Don't trigger a `show` event on the model to show a chat, instead rely
on the `hidden` attribute which causes a rerender and will show/hide
chats.
2021-02-09 15:48:21 +01:00
JC Brand
704b50fb3e Turn HeadlinesBox into a custom element 2021-02-09 15:48:21 +01:00
JC Brand
be9016a081 Fix switching between login and register panels 2021-02-09 15:48:21 +01:00
JC Brand
0ecd86ecf7 Turn MinimizedChatsView into an ElementView subclass 2021-02-09 15:48:21 +01:00
JC Brand
1949356ede Work on turning chat views into custom elements
The eventual goal is to avoid UI-related stanza processing if the relevant chats
aren't in the DOM.

With the current architecture, chatboxes are created (and the stanzas
related to them processed) even if `#conversejs` isn't in the DOM.

* Initial work on making controlbox an element
* Create a shared base class
* Ceate ChatBoxViews proxy
* Update sass now that certain classes are moved to converse-chats element
2021-02-09 15:48:21 +01:00
JC Brand
85bd192f3c Move converse-minimize into a folder
Also, use utility methods instead of adding a mixin to ChatBoxViews
(since we're planning on removing it).
2021-01-18 12:56:17 +01:00