Skip to content
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

Merged
merged 4 commits into from
Jan 7, 2022

Conversation

yenyasinn
Copy link
Contributor

No description provided.

sergepavle
sergepavle previously approved these changes Dec 9, 2021
22Alexandra
22Alexandra previously approved these changes Dec 20, 2021
if (!$event->hasOnlineType()
|| !$event->hasOnlineLink()
|| !$event->hasOnlineDates()
|| !$event->isOnlinePeriodYetToCome($this->requestDateTime)) {
Copy link
Member

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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is correct and it's basically what outlined in the comment above, on the other field, but we should consider marking the field as empty, instead of returning and empty array, as per extra field docs:

image

Copy link
Member

@ademarco ademarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't show the link until the time is right:

image

nagyad
nagyad previously approved these changes Jan 3, 2022
sergepavle
sergepavle previously approved these changes Jan 5, 2022
nagyad
nagyad previously approved these changes Jan 5, 2022
sergepavle
sergepavle previously approved these changes Jan 5, 2022
nagyad
nagyad previously approved these changes Jan 5, 2022
@@ -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.
Copy link
Member

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();
Copy link
Member

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

imanoleguskiza
imanoleguskiza previously approved these changes Jan 7, 2022
nagyad
nagyad previously approved these changes Jan 7, 2022
@22Alexandra 22Alexandra dismissed stale reviews from nagyad and imanoleguskiza via e2c83ae January 7, 2022 12:42
@22Alexandra 22Alexandra force-pushed the EWPP-1802 branch 3 times, most recently from 5b21702 to 014c6c8 Compare January 7, 2022 14:03
@ademarco ademarco dismissed their stale review January 7, 2022 15:12

Dismissing.

@22Alexandra 22Alexandra merged commit 128e3dd into EPIC-EWPP-1539-Event-v2 Jan 7, 2022
@22Alexandra 22Alexandra deleted the EWPP-1802 branch January 7, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants