Page MenuHomePhabricator

TypeError shown when attempting to dismiss New Discussion Tool Hint
Closed, ResolvedPublic

Description

This task is about resolving the error that appears when attempting to dismiss the hint within the New Discussion Tool (T293962) by way of clicking X in the hint's top right corner.

Thank you to the @TheDJ who reported this in Topic:Wmp1zmbzcyd1adxj.

Behavior

  1. Log in to https://patchdemo.wmflabs.org/wikis/f2fc988871
  2. Visit a talk page. E.g. https://patchdemo.wmflabs.org/wikis/f2fc988871/wiki/Talk:The_Hitchhiker%27s_Guide_to_the_Galaxy .
  3. Click Add topic
  4. Verify the hint (T293962) appears above the New Discussion Tool
  5. Click the X that appears in the top right corner of the hint

Actual

  1. ❗️Nothing happens (open the console and see an error that begins with Uncaught TypeError: this.toggle is not a function appears)

Expected

  1. ✅The hint disappears

Done

  • Expected behavior is implemented

Event Timeline

Raising priority so that volunteers can, ideally, experiment with the New Discussion Tool prototype [i] while Foundation Staff are out on holiday break.


i. https://www.mediawiki.org/wiki/Topic:Wmkj01bhaql86bod

matmarex renamed this task from TyperError shown when attempting to dismiss New Discussion Tool Hint to TypeError shown when attempting to dismiss New Discussion Tool Hint.Dec 23 2021, 6:56 PM
matmarex claimed this task.

It's a silly thing to miss, we've moved the code that closes the hint late in development and I guess we didn't re-test it after that change (or notice that it refers to variables in a different scope).

I added a local hack on the demo wiki, so that we won't have to re-make it: https://patchdemo.wmflabs.org/wikis/f2fc988871/wiki/MediaWiki:Common.js

Change 749764 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Fix closing the new topic tool hint

https://gerrit.wikimedia.org/r/749764

I added a local hack on the demo wiki, so that we won't have to re-make it: https://patchdemo.wmflabs.org/wikis/f2fc988871/wiki/MediaWiki:Common.js

Excellent, @matmarex – this looks to be working as expected now.

Change 749764 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Fix closing the new topic tool hint

https://gerrit.wikimedia.org/r/749764

@EAkinloose (In response to the question you asked in the meeting) The legacy hint isn't intended to have the dismiss button, according to T293962#7576903. Does the reasoning there make sense to you?

It does now. Thanks for clarifying @matmarex .