Closed Bug 443977 Opened 16 years ago Closed 16 years ago

Enforce character limit for short description/summary field

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: davemgarrett, Assigned: lorchard)

References

Details

Attachments

(1 obsolete file)

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?
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
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.
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.
(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.
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
(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.
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
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?
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.
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
Closed: 16 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.

Attachment

General

Created:
Updated:
Size: