Fixes T15275.
Details
- Reviewers
valerio.bozzolan - Group Reviewers
O1: Blessed Committers - Maniphest Tasks
- T15275: Project hover-card should show Description
- Commits
- rPd5a28e12a005: Project Hovercards: Show Description
Project pages have "Developer > View Hovercard" button. Or hover over a project handle, I guess.
Also test for empty description and with the description field disabled.
Diff Detail
- Repository
- rP Phorge
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | I thought the intention here was to skip just the current disabled one, so I'm surprised about the break instead of continue. Maybe a better comment to clarify? // The field is disabled, and also the others would always be null. | |
src/applications/project/view/PhabricatorProjectCardView.php | ||
78 | Should we dedicate another variable for this semantically different value, instead of replacing the original one? |
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | It's always the same field... we only have one... | |
src/applications/project/view/PhabricatorProjectCardView.php | ||
78 | we often re-purpose variables when we don't need the old value any more. Semantically they're the same, they are only different on a technical level. This is equivalent of doing $msg = 'foo'; $msg .= 'bar'; |
A person enters in a bar and
- ✅ ... orders a one-line description
- ✅ ... orders a multi-line description
- ✅ ... orders no description
- 🔶 ... orders a lovely "cowsay {{{ asd }}}"
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | Maybe we can use $project = head($projects) to avoid to work inside a loop and just operate on the first element |
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | no, the projects are different, the field instances are different, fields definitions are the same. Each project instance needs its own field instance. |
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | So in theory we should also reset $custom_fields if we find a NULL $field but in that case the $custom_fields is already empty so a break is enough since it always will happen in the first cycle. OK. |
src/applications/project/engineextension/PhabricatorProjectHovercardEngineExtension.php | ||
---|---|---|
37–40 | Again maybe a comment like // The description is disabled for this Project, but also for any other. |
It is possible to encounter a couple of problems but that plague any other Hovercard. Thanks! This is useful.
Note for other people: this shows a one-line, not everything. So the Hovercard is still very small.