Page MenuHomePhabricator

Page tabs act funny when using new topic tool on a non-existent page
Closed, ResolvedPublic

Description

From code review of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/708713, we decided that these issues are not blockers:

A couple of problems with activating the "Add topic" tab (adding 'selected' class in ReplyLinksController):

  1. The "Create source" tab should be deactivated, like the "Read" tab
  2. (In fact, should "Create source" tab even be activated when the page loads with our empty state? That's probably a core bug…)
  3. The "Add topic" tab should be activated when clicking the custom button too – I think this is actually a pre-existing issue in my code affecting all extra buttons, but I only noticed now

Test instructions

  1. Go to a non-existent talk page
    • "Create source" tab should not be active
      image.png (105×583 px, 12 KB)
  2. Click the "Start a discussion" button
    • "Add topic" tab should be active
      image.png (105×583 px, 12 KB)

Event Timeline

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

[mediawiki/core@master] SkinTemplate: Use final action name when marking the active tab

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

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

[mediawiki/extensions/DiscussionTools@master] When opening new topic tool using any link, always activate the link in page tabs too

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

Change 710336 merged by jenkins-bot:

[mediawiki/core@master] SkinTemplate: Use final action name when marking the active tab

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

Krinkle subscribed.

Change 710336 merged by jenkins-bot:

[mediawiki/core@master] SkinTemplate: Use final action name when marking the active tab

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

I left a perf issue in CR at https://gerrit.wikimedia.org/r/c/mediawiki/core/+/710336/comment/02535c8d_218c322d/.

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

[mediawiki/core@master] SkinTemplate: Cache the result of Action::getActionName( $this )

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

Change 710337 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] When opening new topic tool using any link, always activate the link in page tabs too

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

Change 711595 merged by jenkins-bot:

[mediawiki/core@master] SkinTemplate: Cache the result of Action::getActionName( $this )

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