Page MenuHomePhabricator

maniphest title character limit of 255
Changes PlannedPublic

Authored by chasemp on Jul 24 2014, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 24 2025, 9:35 AM
Unknown Object (File)
Apr 3 2025, 2:11 PM
Unknown Object (File)
Mar 27 2025, 3:25 AM
Unknown Object (File)
Mar 21 2025, 7:56 AM
Unknown Object (File)
Mar 10 2025, 8:09 PM
Unknown Object (File)
Mar 8 2025, 5:21 AM
Unknown Object (File)
Feb 18 2025, 1:03 PM
Unknown Object (File)
Feb 13 2025, 9:48 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Prompting for for the title of a maniphest to not exceed 255
characters.

Test Plan

works locally

Diff Detail

Repository
rP Phabricator
Branch
chasemp_upstream
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1877
Build 1878: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

chasemp retitled this revision from to maniphest title character limit of 255.
chasemp updated this object.
chasemp edited the test plan for this revision. (Show Details)
chasemp added a reviewer: epriestley.

notes for my benefit:

 chasemp: epriestley: are you interested in rinky dink contributions like https://secure.phabricator.com/D10041
chasemp
or should I just make a ticket with small things that benefit at some point down the line, don't want to make it a pain for you
epriestley
In theory, yes.
epriestley
In this specific case, the right fix is probably more complicated
chasemp
yeah....I kinda figured once I had it together, but I thought...maybe?
chasemp
seems like a maniphest.max_title_length option or something
chasemp
idk
epriestley
e.g., `strlen()` is wrong since it's byte length, and it should be phutil_utf8_strlen(), and it should be checked in transaction validation, except that we should probably just make the column LONGTEXT instead of limiting it at all
chasemp
ah yes, I live in an ascii world I guess :)
epriestley
Or are you just trying to impose a limit where none currently exists/
chasemp
I made a 10,0000 char title ticket so if there is a limit it's impractically large, but this kind of thing is really ....stopping users from harming themselves since no UI will be able to be friendly with that kind of thing
epriestley
I'd rather let users enter as much text as they want and then shorten it in the UI
chasemp
so anyway, I'll keep trying to put things up and maybe that is just very misguided
chasemp
ah
chasemp
yeah makes sense
chasemp
misguided on my part I meant
epriestley
that's a different length, PhutilUTF8StringTruncator->setMaximumGlyphs()
epriestley
(Which is different from bytes/characters because it handles combining characters.)
epriestley
I'd accept a patch which does (when rendering the list or whatever):
epriestley
$truncator = id(new PhutilUTF8StringTruncator())->setMaximumGlyphs(250);
epriestley
And then:
epriestley
$item->setHeader($truncator->truncateString($task->getTitle()));
epriestley
Although even that should theroetically be more generalized, maybe into PHUIObjectItemView.
chasemp
ok I think I understand that makes way more sense
epriestley
basically everything is hard
epriestley
:)
chasemp
heh yes
chasemp
I will attempt my understanding of the way that is not a kludgy one-off