Prompting for for the title of a maniphest to not exceed 255
characters.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers
works locally
Diff Detail
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
Comment Actions
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