-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EWPP-1802: Improve live stream display. #999
Conversation
3346279
to
a67d7c0
Compare
if (!$event->hasOnlineType() | ||
|| !$event->hasOnlineLink() | ||
|| !$event->hasOnlineDates() | ||
|| !$event->isOnlinePeriodYetToCome($this->requestDateTime)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok to return empty if type, link and dates are empty (as, due to custom validation logic, filling one requires the other two to be filled as well), but we should isolate the isOnlinePeriodYetToCome check, so that we apply cache tags when type, link and dates are filled, but it's still not time to show the field.
|
||
if ($event->isOnlinePeriodYetToCome($this->requestDateTime)) { | ||
// Invalidate cache tags when livestream will be started. | ||
$this->applyHourTag($build, $event->getOnlineStartDate()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cdaa23a
to
87573c5
Compare
@@ -568,7 +572,16 @@ public function testEventRendering(): void { | |||
$this->cronRun(); | |||
$this->drupalGet($node->toUrl()); | |||
|
|||
$description_summary = $this->assertSession()->elementExists('css', '.ecl', $details_content); | |||
// It is time when livestream is active. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean?
]); | ||
// If the livestream is ongoing, we add the livestream link. | ||
if ($event->isOnlinePeriodActive($this->requestDateTime)) { | ||
$link = $entity->get('oe_event_online_link')->first(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to cache by the end date
e2c83ae
5b21702
to
014c6c8
Compare
No description provided.