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)
Sun, Mar 24, 1:16 AM
Unknown Object (File)
Thu, Mar 21, 6:36 AM
Unknown Object (File)
Feb 23 2024, 8:17 PM
Unknown Object (File)
Feb 6 2024, 10:59 AM
Unknown Object (File)
Feb 3 2024, 5:10 AM
Unknown Object (File)
Jan 31 2024, 1:16 PM
Unknown Object (File)
Dec 26 2023, 7:51 PM
Unknown Object (File)
Dec 26 2023, 11:39 AM
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.