Closes T8032
Details
- Reviewers
epriestley lpriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T8032: Calendar description should render with Remarkup
- Commits
- Restricted Diffusion Commit
rP40851e5b2529: Adds Remarkup Rendering to Calendar Events' Descriptions.
Verify that when editing a calendar event's description, there is a UI bar helping with adding markup to the description. Also verify that markup is displayed correctly on the event page once the event has been updated.
Diff Detail
- Repository
- rP Phabricator
- Branch
- remarkuprendering
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 6869 Build 6891: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php | ||
---|---|---|
375 | There should be an icon added here to represent the description section. See the Spaces application for an example. |
One small thing we should fix while we're in here:
Events aren't required to have a description. If they don't have one we'll render an empty "description" header with no description. This is the existing behavior, but is confusing/inconsistent/undesirable.
It would be better not to render this section at all if the event doesn't have a description. You can do this with:
$description = $event->getDescription(); if (strlen($description)) { // Render the description, then addTextContent(...) }
So, events with a description should work just like they do with this patch, but events with no description should just not render the section at all.
Great -- one minor tweak and we're good to go.
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php | ||
---|---|---|
371–375 | Oh, just do this inside the if() block too. Rendering remarkup is moderately expensive and we can skip it if we know there's no description. |