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

[READY] - set starttime, check status of api query, and resize header.png #64

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

sarcasticadmin
Copy link
Member

@sarcasticadmin sarcasticadmin commented Mar 1, 2024

Description of PR

Relates to: #63 #60

Working with @carlynlee and we were having some trouble getting the sign to render the by forcing the datetime: ?year=2024&month=3&day=14&hour=9&minute=30 realized that the starttime was still set to 20x(2023).

There were also some issues with the new header being too large and monopolizing the sign.

Previous Behavior

  • starttime was set for 20x
  • 21x header.png was not proper size
  • twitter api call was assumed to always work
  • missing hr-image.png was causing an error in page render

New Behavior

  • starttime set to 21x
  • 21x header.png resize to expect size ~360x170px
  • twitter api call conditional
  • hr-image.png added back which makes a wave pattern in the middle of the divider between schedule and sponsors

Tests

  • Sign renders as it should locally
  • Setting time to: http://192.168.121.161/?year=2024&month=3&day=14&hour=9&minute=29 and schedule matches: https://www.socallinuxexpo.org/scale/21x/schedule/thursday
    ss-202403011709323901
  • Setting time to: http://192.168.121.161/?year=2024&month=3&day=14&hour=9&minute=30 and first presentation: In-Progress until 10:30 am Tom Bereknyei A Quick Introduction to Nix Room 106
    ss-202403011709324250
  • No error for hr-image.png in browser inspection tools

Previous this was removed during 17x. We could remove this ultimately
but since theres css that was erroring it out Ive temporarily added it
back in.

It provides a small wave pattern on the gray bar that divides the
schedule and the sponsors/tweet space
Since spring forward happens before Scale 21x 3/10/24 we dont have to
worry about doing anything odd with the timestamp. We can set this to
midnight the day of the show.
Copy link
Member

@kylerisse kylerisse left a comment

Choose a reason for hiding this comment

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

this all looks good to me @sarcasticadmin . Appreciate all your work and taking over this application. Looking forward to hacking on some of it with you in a couple of weeks.


### Yearly Tasks

There is a bit of manual effort necessary from year to year. These tasks include, but might not be limitted to:
* update the logo for the curent year at `/server/images/header.png`
* update the logo for the curent year at `/server/images/header.png` should be `360x170px`
Copy link
Member

Choose a reason for hiding this comment

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

new one is 381x170. probably close enough given transparency

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed this too. I believe it was due to: convert header.png -resize 360x170^ new.png where ^ allows for some play given the original file since I didnt want to distort it.

It looks good regardless :)

@@ -71,14 +71,15 @@ This is available in both Schedule and Room views
examples:
* `http://signs.scale.lan/?year=2019&month=3&day=7&hour=9&minute=10`
* `http://signs.scale.lan/?room=ballroom-de&year=2019&month=3&day=8&hour=14&minute=33`
> **NOTE:** This will not work unless `$starttime` is correctly set for the current year of the show
Copy link
Member

Choose a reason for hiding this comment

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

thanks for clarify this

* Do a search and replace for the previous scale version (example: replace all occurances of 16x with 17x)
* verify proper XML is being supplied by drupal from the url reflected in the `$url` variable in `room.php` and `scroll.php`
* set `$starttime` in `scroll.php` which should reflect midnight of the first night of current year show
* set `$starttime` in `scroll.php` which should reflect midnight of the first night of current year show. Example: if the show starts on 3/14/24, then the entry for startime should be: `$starttime = mktime(0, 0, 0, 3, 14, 2024) / 60;`.
Copy link
Member

Choose a reason for hiding this comment

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

thanks for clarifying this

Comment on lines 6 to +10
# before "spring forward"
#$starttime = mktime(0, 0, 0, 3, 5, 2020) / 60;
#$starttime = mktime(0, 0, 0, 3, 9, 2023) / 60;

# after "spring forward"
# 18x
#$starttime = mktime(23, 0, 0, 3, 4, 2020) / 60;
# 19x starts 7/27/2022 23:00
#$starttime = mktime(23, 0, 0, 7, 27, 2022) / 60;
# 20x
$starttime = mktime(23, 0, 0, 3, 8, 2023) / 60;
# 21x
$starttime = mktime(0, 0, 0, 3, 14, 2024) / 60;
Copy link
Member

Choose a reason for hiding this comment

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

no more cruft


# ensure twitter response actually contains statuses
# TODO: fix broken query due to upstream changes
if (array_key_exists('statuses', $results)) {
Copy link
Member

Choose a reason for hiding this comment

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

thanks for wrapping this.

@kylerisse kylerisse merged commit 2c23457 into master Mar 1, 2024
2 checks passed
@kylerisse kylerisse deleted the rh/1709318345 branch March 1, 2024 21:11
@sarcasticadmin
Copy link
Member Author

Thanks @kylerisse, looking forward to the show!

@owendelong
Copy link
Collaborator

owendelong commented Mar 1, 2024 via email

@sarcasticadmin
Copy link
Member Author

Couldn’t we force the size of the png render to that value in the rendering html, eliminating the need to worry about the png dimensions? Admittedly there are possible aspect ratio problems introduced by this, but I think a squashed/stretched png in the right form factor is preferable to the alternative.

@owendelong Absolutely, its just not been a priority

@owendelong
Copy link
Collaborator

Seems like adding two parameters to the IMG tag would be a lot easier than the hoops we've been jumping through.

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.

3 participants