Page MenuHomePhabricator

Adds Remarkup Rendering to Calendar Events' Descriptions.
ClosedPublic

Authored by SalmonKiller on Jun 19 2015, 5:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 12:35 AM
Unknown Object (File)
Wed, Dec 18, 4:36 PM
Unknown Object (File)
Fri, Dec 13, 9:36 PM
Unknown Object (File)
Fri, Dec 13, 10:47 AM
Unknown Object (File)
Wed, Dec 11, 5:54 AM
Unknown Object (File)
Sat, Dec 7, 7:42 AM
Unknown Object (File)
Thu, Dec 5, 4:42 AM
Unknown Object (File)
Tue, Dec 3, 12:16 PM
Subscribers

Details

Summary

Closes T8032

Test Plan

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 6875
Build 6897: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

SalmonKiller retitled this revision from to Adds Remarkup Rendering to Calendar Events' Descriptions..
SalmonKiller updated this object.
SalmonKiller edited the test plan for this revision. (Show Details)
lpriestley edited edge metadata.
lpriestley added inline comments.
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
369

There should be an icon added here to represent the description section. See the Spaces application for an example.

This revision now requires changes to proceed.Jun 19 2015, 5:19 AM
SalmonKiller edited edge metadata.

Added Description Icon

lpriestley edited edge metadata.
epriestley edited edge metadata.

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.

empty.png (1×1 px, 152 KB)

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.

This revision now requires changes to proceed.Jun 19 2015, 12:25 PM
SalmonKiller edited edge metadata.

Removed the description header if the description is empty.

epriestley edited edge metadata.

Great -- one minor tweak and we're good to go.

src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
365–368

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.

This revision now requires changes to proceed.Jun 19 2015, 3:29 PM
SalmonKiller edited edge metadata.

Moved initializer for the description inside the if statement.

epriestley edited edge metadata.

Perfect, thanks!

This revision is now accepted and ready to land.Jun 19 2015, 3:32 PM
This revision was automatically updated to reflect the committed changes.