Page MenuHomePhabricator

Flow: sortable tables don't function post-save (require a page refresh to work)
Closed, ResolvedPublic

Description

If I put the following wikicode in a Flow post body:

{| class="wikitable sortable"
! hello

-
1
-
2
}

Post-save, the table won't be sortable. I have to refresh the page to get the table to be properly sortable.


Version: unspecified
Severity: minor

Details

Reference
bz57157

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:17 AM
bzimport set Reference to bz57157.

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/473, but people from the community are welcome to contribute here and in Gerrit.

You just need to use a mw.hook to which page content handlers like sortable tables and collapsible divs are hooked.

Basically one line: mw.hook( 'wikipage.content' ).fire( $insertedContent );

(You can grep core for mw.hook( 'wikipage.content' ) for usage examples.)

I am a student participating in Facebook Open Academy that's going to work on Flow. I think I will take this to get myself started and get familiar with tools.

Change 112126 had a related patch set uploaded by Legoktm:
fire wikipage.content hook on new posts

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

Change 112126 merged by jenkins-bot:
fire wikipage.content hook on new posts

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