From 003cb24dd85d946b1f117cf1a932c7abda5927dc Mon Sep 17 00:00:00 2001 From: John Livingston Date: Mon, 5 Aug 2024 15:54:03 +0200 Subject: [PATCH] Updating Converse upstream (with bootstrap5): * bootstrap 5 compatibility * other Converse updates integration * hack to get the sidebar work as with Converse v10. * modal onHide was renamed close. * fix slow mode infobox margin. * fix margin * shorter action label, for better dropdown UX. --- conversejs/build-conversejs.sh | 10 +++-- conversejs/custom/index.js | 4 +- .../plugins/notes/templates/muc-note.js | 6 +-- .../plugins/poll/components/poll-form-view.js | 2 +- .../custom/plugins/poll/modals/poll-form.js | 4 +- .../plugins/poll/templates/poll-form.js | 2 +- .../tasks/modals/templates/pick-task-list.js | 32 +++++++-------- .../plugins/tasks/templates/muc-task-lists.js | 4 +- .../plugins/tasks/templates/muc-task.js | 6 +-- .../shared/modals/livechat-external-login.js | 4 +- .../custom/shared/styles/_peertubetheme.scss | 3 +- .../custom/shared/styles/_variables.scss | 10 ++--- conversejs/custom/shared/styles/livechat.scss | 41 +++++++++++++++++-- .../custom/templates/muc-bottom-panel.js | 4 +- conversejs/custom/templates/muc.js | 4 +- conversejs/lib/converse-params.ts | 3 +- .../lib/plugins/livechat-specific/toolbar.ts | 27 ++++-------- languages/en.yml | 6 +-- 18 files changed, 99 insertions(+), 73 deletions(-) diff --git a/conversejs/build-conversejs.sh b/conversejs/build-conversejs.sh index 9ebdedbf..1b16123e 100644 --- a/conversejs/build-conversejs.sh +++ b/conversejs/build-conversejs.sh @@ -18,10 +18,8 @@ set -x CONVERSE_VERSION="v11.0.0" CONVERSE_REPO="https://github.com/conversejs/converse.js.git" # You can eventually set CONVERSE_COMMIT to a specific commit ID, if you want to apply some patches. -# 2024-07-31: using Converse upstream (v11 WIP). -CONVERSE_COMMIT="2f8cfc02d04bb6191b3b9facb706e475836279f5" -# # 2024-07-31: testing the jcbrand/bootstrap5 branch -# CONVERSE_COMMIT="e5edeec997d53a8720470a49685be123e8688e1c" +# 2024-08-05: using Converse upstream (v11 WIP). +CONVERSE_COMMIT="5017efb780973d704f237c478ba52b23d901e1bf" # It is possible to use another repository, if we want some customization that are not upstream (yet): # CONVERSE_VERSION="livechat" @@ -29,6 +27,10 @@ CONVERSE_COMMIT="2f8cfc02d04bb6191b3b9facb706e475836279f5" # CONVERSE_REPO="https://github.com/JohnXLivingston/converse.js" # CONVERSE_COMMIT="xxxx" +# 2024-08-06: including fix waiting for merge: +CONVERSE_VERSION="livechat_converse_11" +CONVERSE_COMMIT="f69b96439ac15d0fc9c138319e2d635ab28be071" + rootdir="$(pwd)" src_dir="$rootdir/conversejs" converse_src_dir="$rootdir/vendor/conversejs-$CONVERSE_VERSION" diff --git a/conversejs/custom/index.js b/conversejs/custom/index.js index 08033a19..fdc969e9 100644 --- a/conversejs/custom/index.js +++ b/conversejs/custom/index.js @@ -8,14 +8,14 @@ * @description This files will override the original ConverseJS index.js file. */ +import 'shared/styles/index.scss' + import './i18n/index.js' import 'shared/registry.js' import { CustomElement } from 'shared/components/element' import { VIEW_PLUGINS } from './shared/constants.js' import { _converse, converse } from '@converse/headless' -import 'shared/styles/index.scss' - /* START: Removable plugins * ------------------------ * Any of the following plugin imports may be removed if the plugin is not needed diff --git a/conversejs/custom/plugins/notes/templates/muc-note.js b/conversejs/custom/plugins/notes/templates/muc-note.js index 92c85ee0..3ef2a6d4 100644 --- a/conversejs/custom/plugins/notes/templates/muc-note.js +++ b/conversejs/custom/plugins/notes/templates/muc-note.js @@ -67,7 +67,7 @@ export function tplMucNote (el, note) { : '' } ${_tplNoteForm(note)} -
+
+ return html`