Page MenuHomePhabricator

Adds Remarkup Rendering to Calendar Events' Descriptions.

Authored by SalmonKiller on Jun 19 2015, 5:12 AM.
Referenced Files
Unknown Object (File)
Sun, Mar 19, 1:50 AM
Unknown Object (File)
Mon, Feb 27, 11:46 AM
Unknown Object (File)
Fri, Feb 24, 12:11 PM
Unknown Object (File)
Feb 20 2023, 11:43 AM
Unknown Object (File)
Feb 7 2023, 4:20 PM
Unknown Object (File)
Feb 1 2023, 5:33 AM
Unknown Object (File)
Jan 29 2023, 10:43 PM
Unknown Object (File)
Jan 24 2023, 10:14 AM



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

rP Phabricator
Lint Not Applicable
Tests Not Applicable

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.

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.


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.