User talk:Jack who built the house/Convenient Discussions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 10 days and sections whose most recent comment is older than 360 days.

Custom timestamp format[edit]

Could this support custom timestamp formats like w:WP:LOCO or moment.js? Aaron Liu (talk) 14:12, 13 May 2023 (UTC)[reply]

Thanks for your many reports. Have no time to respond currently unfortunately. But on this one: You can use the w:WP:LOCO script together with CD, see User:Jack who built the house/Convenient Discussions#Compatibility. To include custom formats in CD itself I think a little overkill. It already has 2 popular formats. If there are some compatibility issues, please tell me. Jack who built the house (talk) 21:52, 9 June 2023 (UTC)[reply]
Thanks! However, this doesn't appear to work. Despite m:User:Aaron Liu/global.js I don't see any change in the timestamp formats. Aaron Liu (talk) 00:05, 10 June 2023 (UTC)[reply]
Please make sure you reset all the timestamp formatting options set in CD: https://imgur.com/a/9SkFfcz. That's how I see this thread with your code: https://imgur.com/a/IQbmYi7. Jack who built the house (talk) 00:36, 10 June 2023 (UTC)[reply]
That did it, thanks! Aaron Liu (talk) 01:01, 10 June 2023 (UTC)[reply]
Also, this doesn't solve the problem that CD kinda solves where all scripts lose effect after refreshing like clicking on the reply button. CD kinda sovled this by inbuilt-ing the date parsing. Aaron Liu (talk) 23:49, 11 June 2023 (UTC)[reply]

Detect signatures supplied by templates[edit]

Some templates like {{rm}} supply a signature at the end of the template, and CD should be able to detect them instead of always supplying a double signature. Aaron Liu (talk) 14:41, 13 May 2023 (UTC)[reply]

@Aaron Liu, you can add .mw-notalk class to these templates :) Iniquity (talk) 12:45, 1 August 2023 (UTC)[reply]
Sorry for the late reply but where in the template do I add it? Aaron Liu (talk) 13:35, 25 August 2023 (UTC)[reply]
@Aaron Liu means that w:template:rm adds a signature when using it with subst:.
CD should be able to detect them instead of always supplying a double signature
I've implemented this, though the solution is hacky and depends on the preview being shown before submitting the form. It works by automatically checking the "Omit signature" checkbox (that is present in the "Advanced" section on comment forms adding sections/subsections) when a double signature is identified. Jack who built the house (talk) 19:57, 25 August 2023 (UTC)[reply]
Nice. However templates like Wikipedia's {{3ORShort}} still give you a double sign. Aaron Liu (talk) 16:44, 29 August 2023 (UTC)[reply]
Ah I see, it should work when replying as well. Will do. Jack who built the house (talk) 18:33, 29 August 2023 (UTC)[reply]
Ah, thanks. Aaron Liu (talk) 19:31, 29 August 2023 (UTC)[reply]
✓ Done. Jack who built the house (talk) 22:36, 21 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

Respect TP magic words[edit]

At w:Talk:Yogurt/yogurtspellinghistory, despite the magic words present in the w:Template:archive template (__NOEDITSECTION__ __NONEWSECTIONLINK__ __ARCHIVEDTALK__), the reply links are still present Aaron Liu (talk) 00:06, 3 June 2023 (UTC)[reply]

@Jack who built the house, did we add support for these words? Iniquity (talk) 12:37, 1 August 2023 (UTC)[reply]
@Aaron Liu, @Iniquity: we support the class .mw-archivedtalk. The problem with the __ARCHIVEDTALK__ magic word, introduced in phab:T249293, is that is has no effect on the page; it only appears in the page properties that you can get with a request like
new mw.Api().get({
  formatversion: 2,
  action: 'query',
  prop: ['pageprops'],
  titles: 'Talk:Yogurt/yogurtspellinghistory',
}).then((r) => console.log(r.query.pages[0].pageprops))
To minimize load times, CD refrains from making any API requests while loading a page unless strictly necessary. So we can say that having reply links on pages where they shouldn't be is not a critical issue. Or we may try to find another solution, but I currently don't see one. Jack who built the house (talk) 09:54, 25 August 2023 (UTC)[reply]

Mobile view[edit]

Hi @Jack who built the house, Is it possible to support mobile view in performance, if you do not have enough time to make it support mobile view, tell me which part is responsible for the view so that I can modify the performance.--Gerges (talk) 06:25, 27 August 2023 (UTC)[reply]

Hi. I haven't started with the mobile view so far because it's too fundamental a task to take on even for me. I don't even know where to start telling... And I was in the middle of a refactoring which would make the code architecture a bit easier to comprehend. Even though I strive to make my code maintainable and extendable by other people, I don't wanna disappoint you and give false hopes that this is feasible in reasonable time. Jack who built the house (talk) 11:29, 27 August 2023 (UTC)[reply]
Hi @Jack who built the house,
Is there anything new about making the tool support Mobile view.-- Gerges (talk) 16:24, 11 March 2024 (UTC)[reply]
Nothing new so far :( Jack who built the house (talk) 17:07, 11 March 2024 (UTC)[reply]
@JWBTH, What is the part of the code that prevents the tool from running on a mobile? -- Gerges (talk) 17:26, 11 March 2024 (UTC)[reply]
It's not that something is preventing the tool from running on mobile. You would need to write a large amount of code to provide support. Jack who built the house (talk) 17:35, 11 March 2024 (UTC)[reply]

Баг[edit]

Приветствую. Баг, возможно, связан с включенным DT. [1] (при редактировании, что до, что после сохранения часть [[ut: отсуствует в окошке). Jaguar K (talk) 15:40, 27 November 2023 (UTC)[reply]

Сложно ловить такие случаи. Скрипт думает, что ссылка с ut: — часть вашей подписи (потому что является ссылкой на вашу страницу обсуждения и стоит недалеко от конца сообщения). Jack who built the house (talk) 22:46, 21 April 2024 (UTC)[reply]

Отключить DT[edit]

Предложение отключить DT не учитывает статус "глобально отключен, локально включен" и потому в этом случае все ссылки в нем нерабочие. P.S. CD запускается по клику на function run() {importScript('MediaWiki:Gadget-convenientDiscussions.js')}, а не при загрузке страницы. Jaguar K (talk) 15:42, 27 November 2023 (UTC)[reply]

🤔 Jack who built the house (talk) 11:22, 10 February 2024 (UTC)[reply]

Hook for after replying[edit]

After adding a comment/topic or just pressing the refresh button with CD, the script reloads the page, removing most text appearance changes. Is there some sort of hook I should use for scripts that run again after CD refreshes the page after adding a new comment/topic? Aaron Liu (talk) 20:44, 27 November 2023 (UTC)[reply]

mw.hook('wikipage.content') should work, see https://doc.wikimedia.org/mediawiki-core/master/js/Hooks.html#~event:'wikipage.content'. Jack who built the house (talk) 12:23, 15 April 2024 (UTC)[reply]
Would that also work on the initial page load? I suspect that it would run on the page before CD processes it, resulting in a broken CD. Aaron Liu (talk) 16:35, 15 April 2024 (UTC)[reply]
resulting in a broken CD
Hm. CD fires the convenientDiscussions.pageReady hook when the processing is done, see https://tools-static.wmflabs.org/convenient-discussions/docs/global.html#event:pageReady. Jack who built the house (talk) 17:22, 15 April 2024 (UTC)[reply]
Well, for me the timestamps disable on reload despite me hooking it. Aaron Liu (talk) 18:01, 15 April 2024 (UTC)[reply]
This is the issue with that script, it doesn't provide the ability to run twice. By the way, do you really need it? CD converts timestamps in different formats as well per preferences. Jack who built the house (talk) 18:28, 15 April 2024 (UTC)[reply]
I like having the actual date show if the time is far away enough.
Anyways, I'll try looking at the script. Thanks! Aaron Liu (talk) 19:06, 15 April 2024 (UTC)[reply]

Double signature when normal sig is 3 ~[edit]

On my home wiki, my signature includes the time hard coded so that I sign with three tildes instead of 4 usually. The reply tool we have available as a gadget, when I include my 3 tilde signature in my comment, would not include its own comment. I see up above in the section on double signatures when templates supply the sig that you have some sort of check box for not supplying signatures, but is there a way to make that checked by default for everything? And I cant see it all when replying? Nableezy (talk) 00:28, 1 December 2023 (UTC)[reply]

pinging Jack who built the house Nableezy (talk) 00:49, 1 December 2023 (UTC)[reply]
Hi @Nableezy,
I wonder why you hard-code the time, if a standard 4~ signature provides it automatically. Michgrig (talk) 15:38, 2 December 2023 (UTC)[reply]
I have my signature in a box on en.wp, and just like the uniform look of having the time within that box as well. Nableezy (talk) 04:08, 3 December 2023 (UTC)[reply]

Keyboard shortcut/key for temporarily disabling bottom right overlay buttons[edit]

There's currently a gesture to hold the four buttons to make them disappear. Could a hotkey also be added for them?
Also, could the quote feature use normal positional parameter stuff instead of the nagging |1=? 😅 Aaron Liu (talk) 00:33, 2 December 2023 (UTC)[reply]

Also, could the quote feature use normal positional parameter stuff instead of the nagging |1=? 😅
↑ This quote would have broken if I didn't use it 😅 Jack who built the house (talk) 22:42, 21 April 2024 (UTC)[reply]

Поиск диффа[edit]

Не работает на [2], видимо, из-за 3 минут разницы. Jaguar K (talk) 21:35, 2 December 2023 (UTC)[reply]

Respect preload parameters?[edit]

On w:Template talk:W-graphical, there is a "Request edit" button that normally preloads and fills in the $1 parameter. However, CD currently doesn't fill it in. Could CD perhaps do that? Aaron Liu (talk) 20:42, 16 December 2023 (UTC)[reply]

Will do. Jack who built the house (talk) 20:54, 16 December 2023 (UTC)[reply]
✓ Done. Jack who built the house (talk) 22:35, 21 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

Баг[edit]

При редактировании [3] отображает лишь это — </syntaxhighlight>?. DT был включен, но не влияет на это последнее (описываемое) редактирование. --Jaguar K (talk) 08:12, 6 January 2024 (UTC)[reply]

Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

Как вытащить запрос из архива[edit]

@Jack who built the house and JWBTH: месяц назад я на ru:ВП:ЗКА подавал запрос, который сегодня ушёл в архив без итога. Возможно ли, так сказать, достать запрос из архива с помощью «Удобных обсуждений»? Guest Kashapov (talk) 06:08, 26 January 2024 (UTC)[reply]

@Guest Kashapov: Я реализовал эту функцию. Можете попробовать ей воспользоваться — выберите «Перенести» в меню заархивированной темы и перенесите, как обычно переносте темы. Jack who built the house (talk) 22:34, 21 April 2024 (UTC)[reply]

Discussion regarding potential feature request[edit]

I'm using CD often on the English Wikipedia, and have found excellent use of all the buttons that do code, bold, italics, etc...

Concerning the "Quote the Selected text" button, I find that I rarely use it and would benefit from this button being changed to using in-line quotation instead of quote block. Or would it be better to have two buttons, one for {{tqb}} and one for {{tq}}?

Looking forward to everyone's thoughts!

Cheers, Cocobb8 (talk) 13:39, 18 March 2024 (UTC)[reply]

Hi! I actually have thought myself that en:template:tq may be more reasonable than en:template:tqb, since
  • you usually don't need to ping the user;
  • long, multiline quotations (which look better in tqb) are rarely needed;
  • more often than not you quote a comment directly above you, and the timestamp isn't helpful as well.
On the other hand, if we suppress the linking of the username and also provide a link to the target comment (which I suggested, but nobody commented), tqb would make more sense. Jack who built the house (talk) 14:57, 18 March 2024 (UTC)[reply]
That's why having both might be better? Note that I've seen much use of {{tq}} being used to quote from policies and guidelines too. Cocobb8 (talk) 15:11, 18 March 2024 (UTC)[reply]
✓ Done. Currently reverted to the use of en:template:tq. The ability to use the block template is still there (and used automatically in one special case when replying to a comment that has outdented replies, hence can't be replied directly). We need to think whether we need to use it in other cases and how. Jack who built the house (talk) 22:32, 21 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

Опять съехала подсветка[edit]

Привет! Когда-то уже был такой баг, но вроде бы его исправляли. Подсветка новых сообщений съезжает существенно ниже. См., например, https://imgur.com/7kgIlMT Michgrig (talk) 14:59, 21 March 2024 (UTC)[reply]

Кря? Michgrig (talk) 19:04, 14 April 2024 (UTC)[reply]
Кря, да, мы обсуждали в последний раз на User talk:Jack who built the house/Convenient Discussions/Archives/2023#Кривая подсветка новых сообщений. Пока не могу ничего сказать. Вроде как число жалоб уменьшилось с прошлого раза, то есть баг относительно редок. Jack who built the house (talk) 11:12, 15 April 2024 (UTC)[reply]

Add ctrl options[edit]

@Jack who built the house: Hello again! I've come up with another potential feature that might further improve CD. How about CTRL options to do things such as bold text, italics, underline, bullet lists and more? Would such a thing be possible to implement?

Cheers, Cocobb8 (talk) 13:33, 25 March 2024 (UTC)[reply]

We need to think about that. It is possible to implement; the problems are –
  1. Ctrl options are prone to having conflicts with browser shortcuts.
  2. It would be best if whatever we introduce is aligned with what MediaWiki does. Currently, AFAIU, WikiEditor doesn't support such shortcuts. See https://phabricator.wikimedia.org/T62928. VisualEditor supports them though.
Jack who built the house (talk) 14:03, 25 March 2024 (UTC)[reply]
Visual Editor and Discussion Tools support CTRL+B, CTRL+U and CTRL+I for bold, underline and italics respectively. Cocobb8 (talk) 14:07, 25 March 2024 (UTC)[reply]
Right. Well, given that there is currently no activity in the linked task, I guess I'll try to implement them in the near term. Jack who built the house (talk) 14:13, 25 March 2024 (UTC)[reply]
Awesome! So here's the list of potential shortcuts to be added:
  • CTRL+B: Bold
  • CTRL+I: Italics
  • CTRL+U: Underline
  • CTRL+K: Link (opens same link dialogues as when pressing the link button)
  • CTRL+SHIFT+8: Bullet list? That's the shortcut for it in Google Docs.
Please modify my comment as you see fit. Cocobb8 (talk) 14:24, 25 March 2024 (UTC)[reply]
+1 Michgrig (talk) 18:26, 30 March 2024 (UTC)[reply]
What do you think should happen for "Link" (Ctrl+K)? A dialog, like when clicking the button in the toolbar? [[]] markup inserted around the cursor? Jack who built the house (talk) 11:38, 14 April 2024 (UTC)[reply]
@JWBTH, the dialog was what I was thinking of. Cocobb8 (talk) 13:08, 14 April 2024 (UTC)[reply]
✓ Done. Jack who built the house (talk) 22:30, 21 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

CSS suggestion to fix extraneous padding in the last paragraph[edit]

.cd-comment-part-last {
	padding-bottom: 0
}

Aaron Liu (talk) 19:48, 30 March 2024 (UTC)[reply]

Yeah, I already have this fixed in my local development version, together with many other issues. I'll release it soon. Jack who built the house (talk) 16:35, 1 April 2024 (UTC)[reply]
✓ Done. Jack who built the house (talk) 22:30, 21 April 2024 (UTC)[reply]
All of the changes in .3 are really good! Thanks for your development! Aaron Liu (talk) 00:24, 22 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)

Содержание[edit]

Здравствуйте. Из "Удобных дискуссий" было убрано "Содержание", появляющиеся слева сверху и позволяющее быстро переходить к началу раздела? — Vladlen Manilov / 16:29, 21 April 2024 (UTC)[reply]

Нет, простите, я забыл протестировать этот компонент, сам сидя на новом Векторе :) Сейчас починим. Jack who built the house (talk) 20:41, 21 April 2024 (UTC)[reply]
✓ Починили. Jack who built the house (talk) 22:29, 21 April 2024 (UTC)[reply]
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Iniquity (talk) 11:46, 28 April 2024 (UTC)