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

Fix missing Program tab #4551

Merged
merged 3 commits into from
Feb 10, 2025
Merged

Conversation

toddburnside
Copy link
Contributor

The Program tab was not displaying because it required the semester from the call for proposals. We looked up the CfP using the id in the proposal of the program details, but since we were only downloading the open CfPs, if the proposal specified a CfP whose deadline had passed we wouldn't find it and wouldn't display the tab.

I initially just downloaded all the CfP (didn't filter for open in the query) and filtered for open locally. Then I realized it was silly to download an ever expanding list of CfPs that we didn't really need, and just downloaded the whole CfP for the proposal instead of just the CfP Id.

The first commit just switches to monadic style hooks and cleans up some commented out code. The second is where the real changes are.

Copy link

bundlemon bot commented Feb 10, 2025

BundleMon

Files updated (1)
Status Path Size Limits
index-(hash).js
1.74MB (-1.03KB -0.06%) -
Unchanged files (7)
Status Path Size Limits
exploreworkers-(hash).js
597.5KB -
index-(hash).css
66.23KB -
workbox-window.prod.es5-(hash).js
2.07KB -
plotworker-(hash).js
85B -
agsworker-(hash).js
83B -
itcworker-(hash).js
83B -
catalogworker-(hash).js
82B -

Total files change -1.03KB -0.04%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

val cfpActivePeriod: Option[DateInterval] = details.proposal.flatMap(_.call).map(_.active)

// We `should` always have a call for proposal if we get here, but...
def dateOrMissing(o: Option[LocalDate], label: String) =
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can just omit the element if the date is missing?

Also, could we add explicit types?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could do that, but I thought it might be easier to debug in the future if we ever run into this again. It should never happen since the program tab is only for ACCEPTED proposals, which should have a CfP. But, omitting them would be cleaner, I guess.

Copy link
Contributor

@rpiaggio rpiaggio left a comment

Choose a reason for hiding this comment

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

LGTM

@toddburnside toddburnside changed the title Monadic hooks Fix missing Program tab Feb 10, 2025
@toddburnside toddburnside merged commit dfcfdf5 into main Feb 10, 2025
14 checks passed
@toddburnside toddburnside deleted the sc-4691-program-tab-blank-in-explore-take2 branch February 10, 2025 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants