fixed margin issue in msg_text, merged upstream #9

Merged
muppeth merged 118 commits from muppdev into darkbeet 2021-07-12 00:03:05 +02:00
Owner
No description provided.
muppeth added 118 commits 2021-07-11 23:59:39 +02:00
1598640c80 Remove line-breaks from message image markup
We use `white-space: pre-wrap` to render the messages, so line-breaks in
the markup add unnecessary space.
0756af2b30 Refactor chat `close` methods
- Remove the shared base-class method.
- Trigger `chatBoxClosed` on the model
- Send CSN from the model, not the view
59d55b3526 Add option to deregister nickname when closing a MUC
By setting `auto_register_muc_nickname` to `'unregister'`
ec93e2fff3 Render chat messages loading spinner declaratively
instead of imperatively.

Add new non-persisted UI model for rendering UI changes. Currently only
being used for rendering the spinner
fe3e63d8c5 Declarative scrolling and rendering new messages indicator
- Increment `num_unread` when new messages appear while scrolled up
- Set scrolling state in model code (as opposed to view)
f3efbba26c Create `converse-message-form` component
More work on making bottom panel sub-components declarative

- Handle auto-completion in the converse-muc-message-form element
- Make message limit indicator a component
- Rename template
e3612e8c62 Turn the chats into Lit components
Previously they were of type ElementView from @converse/skeletor

The ElementView component is merely a helper to allow us to eventually
migrate everything to Lit
c966c49304 Fixes #2500
This wrongly stored value wasn't inlcuded in the published the bundle
because the libsignal store was used, which had the right value for the public key.

Instead, this value was used locally by being passed to the libsignal
session builder to verify signed prekey.
9bcf5f2947 Scrolling fixes
* Remove extra `_markScrolled` function
* Only try to maintain scrolling position when some non-scrolling change has happened.
825e2643ae Use `flex-direction: column-reverse`
On the `<converse-chat-content>` element. This removes the need for all
the manual scrolling.

Firefox finally supports this feature. Unfortunately Firefox ESR doesn't
yet, but I can't wait anymore.
878a3b49a7 Prevent multiple 'New messages' dividers from appearing
Would happen when scrolled up and a new message comes in
ff1b6d3adf MUC: Don't first check if we're registered before unregistering
The IQ stanza being sent to check was in any case incorrect and it
doesn't seem necessary.
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).
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.
c8304497b5 Remove onStatusMessageChanged handler
It's no longer necessary and calls a method that doesn't exist anymore.
bbc952b265 Fix MUC and headlines heaidngs, so that they still work
as ElementViews, since I ran out of time converting them to lit
components as well.

This reverts commit 1121a90af0.
dc711d494f Add a placeholder to indicate a gap in the message history
The user can click the placeholder to fill in the gap.
5ea9564cc3 Add new configuration setting `prune_messages_above`
If set to a positive integer, the chat history will be kept to that size
by removing older messages.

This happens as new messages come in (as long as the chat isn't scrolled up)
and when the user scrolls down.

Also add the `pruning_behavior` setting
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.
fb6bafdf6c Styling: Fix an offset bug
That caused empty inline code hints to be considered valid.

Also update the tests that were failing due to the changes in the
previous commit.
cba44998b9 Translated using Weblate (Turkish)
Currently translated at 100.0% (510 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/tr/
c80d65cf60 Translated using Weblate (Russian)
Currently translated at 100.0% (510 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ru/
f6de5247d6 Translated using Weblate (Galician)
Currently translated at 100.0% (510 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/gl/
789d3438e3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.8% (504 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt_BR/
f846cb1b20 Translated using Weblate (Portuguese)
Currently translated at 100.0% (510 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/
a5c391a6a3 Translated using Weblate (French)
Currently translated at 100.0% (510 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/fr/
778121010f Translated using Weblate (Polish)
Currently translated at 92.7% (473 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pl/
aa80093665 Translated using Weblate (Swedish)
Currently translated at 99.6% (509 of 511 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/sv/
0b00d4f9e1 Translated using Weblate (Spanish)
Currently translated at 90.7% (463 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/es/
f9a2719507 Translated using Weblate (Romanian)
Currently translated at 43.7% (223 of 510 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/
f4da817cb2 Upgrades
babel/cli, lerna/ mini-css-extract-plugin, postcss-clean and webpack-merge
46f567d0d1 Fix memory leak in sessionStorage
The disco entities collection gets recreated and repopulated every time
the connection is re-established or after the user logs in again after
having logged out.

The old disco entities weren't being removed, due to an erroneous
`shouldClearCache` call (not applicable to sessionStorage data).

In addition we need a handler to fire and clear the entities cache when
Converse is going to restart.
956a890b94 Don't reject on error in sendTimedMessage
It's the only way I could get a failing test (due to the Jasmine upgrade AFAIK) to pass.

I don't understand why this happens, given that the promise has a
`catch` clause in `retractOwnMessage`, but for some reason the promise
rejection gets caught by Jasmine, causing the test to fail.
6665bef76c Fix failing tests
Handle missing message model (happens during tests)
3d8852950d Add ability to let dropdown appear at the top, left-aligned
And use that for the last message in the chat history, otherwise the
dropdown is obscured.
01efb02f9e Make sure XEP-0363 urls are also OMEMO encrypted
by re-using `ChatBox.prototype.sendMessage`.

updates #1182
06460507d4 Don't let message actions drop upwards if...
it's the first (or second) message in the history, otherwise it might
appear behind the chat header.
fe3650d766 Bugfix. XEP-0198 stream management not working when using IndexedDB
The issue was that batched writing was incorrectly also being applied
for sessionStorage stores, so when the `active` flag in
`_converse.session` was being set to `false` on window unload, the
change wasn't persisted before the window was unloaded.

This caused a new session to be created upon reload, thereby losing the
SMACKS data.

We already solved this for persistent stores by flushing them, and
doing so for the session stores would also work, but session stores
don't have to be batched in the first place, so we turn that off.
muppeth merged commit 101139e633 into darkbeet 2021-07-12 00:03:05 +02:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Label
feedback
theme
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Disroot/converse.js#9
No description provided.