Closed Bug 495878 Opened 15 years ago Closed 15 years ago

Remove duplication in collection search and collection listing

Categories

(addons.mozilla.org Graveyard :: Collections, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbalogh, Assigned: smccammon)

References

()

Details

Attachments

(1 file)

This is handled in collection_controller:_listingSorting() and _listing() now.
Jeff,

Sorting works for me on the search page, however eliminating the duplicate code in the search controller and view is very desirable.

I can move _listingSorting() and all but rendering in _listing() into a new component called CollectionsListing. Then search controller can take advantage of the shared code.

For the view code, the only major differences are: h2 header, tabs/no tabs, and extra query params for the sort form.

Do you think it would be better to factor out a handful of common elements, or simply mix in a couple of special checks for search in collections/listing.thtml?
Status: NEW → ASSIGNED
I prefer small building blocks, so I would go with pulling together a few elements than trying to cram it all into one heap.  And the component sounds sweet!

I was only looking at the initial diff, not the current code, which didn't have working sorting.
Summary: Sort by in search/collections doesn't work → Remove duplication in collection search and collection listing
Attached patch patch v1Splinter Review
This is an improvement, though there is still a lot of view overlap due to container elements.

The patch also brings search up to date with the recent jqModal requirement.
Attachment #381675 - Flags: review?(jbalogh)
Comment on attachment 381675 [details] [diff] [review]
patch v1

Looks good, though you may want to change the contributors & copyright date on the licenses.
Attachment #381675 - Flags: review?(jbalogh) → review+
r27193
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
removing "push-needed" from 105 AMO 5.0.6 bugs; filter on "I hate stephend!"
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: