Page MenuHomePhabricator

NTOC doesn't update when a header is added using the toolbar
Closed, DeclinedPublic

Description

Author: wikibugs

Description:
Wiki_r61227_2010-01-21_NTOC.pdf

Reporting against Babaco Release : r61227

Steps to Reproduce ::

  1. Select a random page
  2. Add headings

<<Headings are not immediately showing in the Navigable TOC>>

  1. Click on a heading

<< Nothing changes>>

  1. Click on Hide Content and again click on Show content
  2. Click on a heading

<<shows the heading, sometimes highlighting the previous heading>>

Please refer to the attachment for a detail description

Expected Outcome::

Header items should display in Navigable TOC as soon as it is added to the editor

Test Environment::

Browser (User-Agent): Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)

Browser (User-Agent): Opera/9.63 (Windows NT 6.0; U; en) Presto/2.1.1


Version: unspecified
Severity: major

Attached:

Details

Reference
bz22201

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
ResolvedNone
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:51 PM
bzimport set Reference to bz22201.
bzimport added a subscriber: Unknown Object (MLST).

nkomura wrote:

How long was the lag approximately in Calcey's environment?

(In reply to comment #1)

How long was the lag approximately in Calcey's environment?

For clarity: there's a 1/4 second delay in that the TOC is only refreshed 1/4 second after you stop typing or do certain other things. This report seems to suggest that the delay is substantially longer, though.

amiller1 wrote:

Another thought: When you add a heading via the toolbar, it isn't added to the TOC. It gets picked up as soon as you start to edit the default text that is placed into the text, but when the text is added as a result of the click event on the toolbar's heading drop down, a change event doesn't seem to get fired.

Is this the desirable behavior? Or should we be adding it to the TOC as soon as it's in the text area, regardless of wether it's the default text or not?

(In reply to comment #3)

Another thought: When you add a heading via the toolbar, it isn't added to the
TOC. It gets picked up as soon as you start to edit the default text that is
placed into the text, but when the text is added as a result of the click event
on the toolbar's heading drop down, a change event doesn't seem to get fired.

Is this the desirable behavior? Or should we be adding it to the TOC as soon as
it's in the text area, regardless of wether it's the default text or not?

This used to work, probably lacking a .trigger( 'change' ) in encapsulateSelection. Will poke at it.

(In reply to comment #5)

Fixed in r61402.

Oops, this rev only fixes the bug Adam mentioned in comment #3, not the bug as filed.

We are now listening for encapsulateSelection as well when looking for headings, which resolves this quite nicely.

wikibugs wrote:

Wiki_r61537_2010-01-27_Headings.pdf

Attached:

wikibugs wrote:

(In reply to comment #8)

Created an attachment (id=7028) [details]
Wiki_r61537_2010-01-27_Headings.pdf

Verified against r61537

Different browsers display differently on creating and highlighting header items. Please refer the attachment.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221
Firefox/3.5.7 (.NET CLR 3.5.30729)

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727;
Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR
3.0.30618)

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like
Gecko) Chrome/3.0.195.38 Safari/532.0

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.28 (KHTML, like
Gecko) Version/3.2.2 Safari/525.28.1

Opera/9.63 (Windows NT 6.0; U; en) Presto/2.1.1

This seems to be a mixture of different issues, most of which were fixed. Could you retry after I update the software on prototype?

Solved this in r61584 by adding <div> to <br> conversion in getContents.

wikibugs wrote:

Wiki_r61577_2010-01-28_Headings.pdf

attachment Wiki_r61577_2010-01-28_Headings.pdf ignored as obsolete

wikibugs wrote:

Comment on attachment 7038
Wiki_r61577_2010-01-28_Headings.pdf

deleting the attachment

wikibugs wrote:

Wiki_r61584_2010-02-01_Headings.pdf

Attached:

wikibugs wrote:

Verified against the latest version hosted on http://test.wikipedia.org

NTOC is updated as user enters heading from toolbar.
NTOC is highlighted when a heading is selected.

wikibugs wrote:

Wiki_prod_2010-02-08_headers.pdf

Test link : http://en.wikipedia.org/wiki/Main_Page

Steps:

  1. Edit a page
  2. Add a heading
  3. Move to the end of the added heading and press enter
  4. Add another heading

Browsers :

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.28 (KHTML, like Gecko) Version/3.2.2 Safari/525.28.1

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17

Attached:

wikibugs wrote:

(In reply to comment #16)

Created an attachment (id=7083) [details]
Wiki_prod_2010-02-08_headers.pdf

Test link : http://en.wikipedia.org/wiki/Main_Page

Steps:

  1. Edit a page
  2. Add a heading
  3. Move to the end of the added heading and press enter
  4. Add another heading

Browsers :

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like
Gecko) Chrome/3.0.195.38 Safari/532.0

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.28 (KHTML, like
Gecko) Version/3.2.2 Safari/525.28.1

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.17 (KHTML, like
Gecko) Version/4.0 Safari/530.17

Therefore reopening the bug

wikibugs wrote:

Tested link: http://prototype.wikimedia.org/deployment-en/
Version : r62529

Bug verification depend on Bug 22543

(In reply to comment #18)

Tested link: http://prototype.wikimedia.org/deployment-en/
Version : r62529

Bug verification depend on Bug 22543

... which I marked as FIXED 20 minutes before you posted this comment.

Closing old tickets about Navigable TOC which is not worked on anymore.