Last modified: 2013-07-02 13:07:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51869, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49869 - Sort page elements alphabetically
Sort page elements alphabetically
Status: VERIFIED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Tomislav Plavcic
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 11:38 UTC by Željko Filipin
Modified: 2013-07-02 13:07 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2013-06-20 11:38:32 UTC

    
Comment 1 Željko Filipin 2013-06-20 13:35:37 UTC
Page elements[1] should be sorted alphabetically. This is how an element looks like:

element_type(:element_name, attribute_type: attribute_value)

Example (from aftv5_page.rb[2]):

div(:aft_box, id: 'mw-articlefeedbackv5')
a(:view_article, text: 'View article')

Elements should be sorted by :element_name, so the elements in the example above are sorted correctly, since :aft_box should be before :view_article.

1: https://github.com/wikimedia/qa-browsertests/tree/master/features/support/pages
2: https://github.com/wikimedia/qa-browsertests/blob/master/features/support/pages/aftv5_page.rb
Comment 2 Gerrit Notification Bot 2013-06-25 22:23:45 UTC
Related URL: https://gerrit.wikimedia.org/r/70555 (Gerrit Change I259db184cc603508bddd88c4cdaabb9693778f7a)
Comment 3 Tomislav Plavcic 2013-06-25 22:31:40 UTC
Page elements can be sorted in VIM with this:
:9,19 sort ri /(:.\{-}, /
9 being the first line, and 19 the last line of page elements in the file.
It can't be used if you have page elements with "do" blocks because it's multiline - it would require a more complex script.
Comment 4 Željko Filipin 2013-07-02 12:20:37 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/70555

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links