This reverts commit 7af73c3471.
Doesn't look like the right approach for adding support for XEP-0156.
Work on that will continue in a branch in the meantime.
* src/converse-controlbox.js
async/await causes many tests here to fail due to the controlbox toggle
now apparently showing up a little later (and the tests don't wait for
it to happen).
* src/converse-minimize.js
We get timeout issues in tests.
* src/headless/converse-chatboxes.js
We get a stack overflow while running tests.
We now have uniform avatar rendering for the profile, messages and
chatboxes.
By rendering as canvas, we can avoid stretching the image.
In the process I also moved the ChatBoxViews collection into its own
plugin `converse-chatboxviews` and placed the AvatarAware views there.
fixes#1157
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.
Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.
Additionally, update singleton models to have the 'id' available as a getter.
Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
Removed `_converse.chatboxviews.showChat` and trying to simplify how
chats are created and when they're shown.
Prompted by the work to split the MUC views into a separate plugin
- Use `enabled` method for plugins
- Rename `converse-inverse.js` to `converse-fullscreen.js` and make it a
core plugin.
- We're no longer making separate mobile and inverse builds
No longer a need to whitelist/blacklist plugins for inverse to work.
* Consistent unread messages count updating on ChatBoxView, Minimized ChatBoxView, RosterView and page's title
* Add tests for checking unread messages count updates in different GUI parts
* Update docs/CHANGES.md
* document windowStateChanged event in events.rst
What started as an attempt to fix a bug in parseXUserElement, turned into
another large refactoring of MUC code, and it's not clear how to break this up
into multiple atomic commits. So I'm just pushing it all.
At least there are two new tests added to the suite.
Bug got introduced during fix for #677
Eventually had to do a significant refactoring, to more consistently use the
`hidden` class instead of `display: None`. (relevant for #695)
This change refactors out the plugin code from converse-core into
src/converse-puggable.js
Additionally, plugins now have an optional attribute `optional_dependencies`
which is an array of dependencies which are "nice-to-have" but not essential.
Work has also been done to ensure that a plugins' dependencies are first loaded
before the plugin itself.
Otherwise maximized chats are scrolled to the top, showing the oldest messages.
Ideally we'd probably like to remember the scroll position, and show that, but
this would require some significant refactoring.
Otherwise the hide event can prevent a consecutive show event.
This bug becomes apparent when maximizing a minimized chat in a screen with not
enough space.
Another box will have to be minimized, which causes first a hide and then a
show event on the minimized chats toggle.
- Don't call show in a room's initialize method (instead let the code be more
similar to normal chats, in that it should listen to the "show" trigger).
- Rename chatBoxShouldBeShown to chatBoxMayBeShown
- Implement auto_join for rooms only once boxes have been fetched already.
Don't call trimChats in onChatBoxAdded event. Reduntant because it will be
called after maximization and after being shown.
Add new method getShownChats and don't trim if only one or zero chats are being
shown.
Don't trim chats when in responsive mode.
Don't call trimChats unnecessarily in the render method of the trimmed chats
thingy.
Previously views were only hidden, but not removed. This was an unnecessary
"optimization" which introduced unnecessary complexity.
Problem solved was that closing minimized chats didn't dereference the model
for hidden "normal" chat views, causing an exception to be raised when trying
to log out.