Merge ~nteodosio/software-properties:comment-flood into software-properties:ubuntu/master
Proposed by
Nathan Teodosio
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Nick Rosbrook | ||||
Merged at revision: | bd84e85981cea5f8af0dcc72c959ce430d909dbe | ||||
Proposed branch: | ~nteodosio/software-properties:comment-flood | ||||
Merge into: | software-properties:ubuntu/master | ||||
Diff against target: |
18 lines (+5/-2) 1 file modified
softwareproperties/SoftwareProperties.py (+5/-2) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Andres Klode | Approve | ||
Ubuntu Core Development Team | Pending | ||
Review via email:
|
Description of the change
Don't show more than one comment in "other software", otherwise the interface is flooded.
The problem was surfaced by LP:2060915 (see attached screen shot[1]).
To post a comment you must log in.
Two things to sort out:
- The first line may be empty
- If we hide stuff should display [...]
I'd wager replacing newlines by spaces and picking a length to display would be easier avoids having to deal with empty lines at least, and can produce more details, something like:
source. comment. replace( "\n", " ")[:80] + ("[...]" if len(source.comment) > 80 else "")