bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Enforce character limit for short description/summary field

RESOLVED WORKSFORME

Status

addons.mozilla.org Graveyard
Public Pages
RESOLVED WORKSFORME
10 years ago
3 years ago

People

(Reporter: Dave Garrett, Assigned: lorchard)

Tracking

unspecified
4.0.3

Details

Attachments

(1 obsolete attachment)

(Reporter)

Description

10 years ago
See bug 442683.

The character limit for the short description (summary) field is too long.  Excessively long descriptions make the add-on list pages on AMO look bad and they don't fit correctly in the Get Add-ons window in Firefox 3.  Even slightly too long descriptions don't fit inside the tiny space given when listed on a category landing page.

Lowering the character limit for this supposedly short field sounds like an obvious solution to this issue.  As an opening guess, I'd suggest a limit of 400 characters.  Sound reasonable?
(Assignee)

Comment 1

10 years ago
Created attachment 330646 [details] [diff] [review]
bandaid to make web UI layout more sane on AMO

This isn't an overall fix, but it might help to make the visual layout in the web UI more sane for extra long addon descriptions.  It limits the summaries to 400 characters, using an ellipsis linked to the detail page when necessary
(Reporter)

Comment 2

10 years ago
An overall and simpler fix would be to just change the field length in the DB. One SQL command would probably do it. All entries over the limit would be truncated. (thus correcting the length everywhere, including results shown in the Get Add-ons window) The only other thing we'd need would be a patch to limit the entry field, so as to not try to add beyond the limit in the future.

If you wanted to get fancy, you could also print a list of those with currently long fields so as to email them all so they can be updated with a non-truncated version.
(Reporter)

Comment 3

10 years ago
I'll bump up the severity, as this really screws with the new slider feature.
Severity: minor → normal
Target Milestone: --- → 3.x (triaged)
We can't make db field length changes like that because all translated fields are stored in the same translations table as type TEXT.

The character limit on summary fields has always been 250 characters, but because of the way the translation box system was setup we couldn't enforce it consistently in all places it could be changed. With the new Developer Tools in 3.5 it will be enforced everywhere, so eventually the bad add-ons will have to shorten their summaries to make any changes.
(Reporter)

Comment 5

10 years ago
(In reply to comment #4)
> We can't make db field length changes like that because all translated fields
> are stored in the same translations table as type TEXT.

Did not know that. Definitely complicates things.

> The character limit on summary fields has always been 250 characters, but
> because of the way the translation box system was setup we couldn't enforce it
> consistently in all places it could be changed. With the new Developer Tools in
> 3.5 it will be enforced everywhere, so eventually the bad add-ons will have to
> shorten their summaries to make any changes.

Is there some other way we can truncate all overly long summaries in this system? If not, then the I guess best route would be to just go with a version of the band-aid modified to 250 characters and manually fix any other severe issues like bug 442683.
(Assignee)

Comment 6

10 years ago
Comment on attachment 330646 [details] [diff] [review]
bandaid to make web UI layout more sane on AMO

Never mind, this patch belongs to bug 444817 - a solution addressing the data itself is a different can 'o worms.
Attachment #330646 - Attachment is obsolete: true

Comment 7

10 years ago
(In reply to comment #6)
> Never mind, this patch belongs to bug 444817 - a solution addressing the data
> itself is a different can 'o worms.

The easiest solution is probably restricting the field length in the respective model. It will then reject any try to save anything longer than that.
(Reporter)

Updated

10 years ago
Summary: Consider lowering character limit for short description/summary field → Enforce character limit for short description/summary field
Fred, please add this restriction.
Assignee: nobody → fwenzel
Target Milestone: 4.x (triaged) → 4.0.3
Assignee: fwenzel → fligtar
Assignee: fligtar → lorchard
(Assignee)

Comment 9

10 years ago
Wish I could reclaim my ancient lorchard@bowneinternet.com bugzilla account :)
Assignee: lorchard → lorchard
(In reply to comment #9)
> Wish I could reclaim my ancient lorchard@bowneinternet.com bugzilla account :)

File a bug?
(Assignee)

Comment 11

10 years ago
Hmm.  Looking in the developer tools, it already appears that a limit of 250 is imposed on summaries.  Does that mean this bug is now invalid?
If you confirmed that it works, it's fixed, rather.
(In reply to comment #11)
> Hmm.  Looking in the developer tools, it already appears that a limit of 250 is
> imposed on summaries.  Does that mean this bug is now invalid?

Comment 4 indicates that, yeah, and I've just tested (again) that it's true for the "Add-on Summary" field on https://preview.addons.mozilla.org/en-US/developers/addon/edit/7526/descriptions.

If you mark it, I'll gladly verify is as fixed.
(Reporter)

Comment 14

10 years ago
Well, it won't be fully done until the new dev tools are mandatory and no one can use the old ones.
We're going to deprecate the old tools, so that will fix the glitch.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.