-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Separately query server for featured events #4653
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: Separately query server for featured events #4653
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/ccsaf6eyh |
Codecov Report
@@ Coverage Diff @@
## development #4653 +/- ##
===============================================
+ Coverage 23.03% 23.11% +0.07%
===============================================
Files 476 476
Lines 4962 4967 +5
Branches 8 8
===============================================
+ Hits 1143 1148 +5
Misses 3818 3818
Partials 1 1
Continue to review full report at Codecov.
|
app/routes/index.js
Outdated
} | ||
] | ||
} | ||
] |
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.
This shows all featured events including the ones from past
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.
Done
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.
Nope. Reuse the returned filterOptions. This will break on search page
Since call for speaker filtering using server will be difficult, change the computed property to filter those from combined featured and upcoming events |
app/controllers/index.js
Outdated
event_name = null; | ||
filterDate = null; | ||
|
||
@computed('filteredEvents.[]') |
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.
You haven't listed featured events in computed dependency
app/controllers/index.js
Outdated
const endDateTime = callForPapers.get('endsAt'); | ||
const privacyState = callForPapers.get('privacy'); | ||
return (moment().isBetween(startDateTime, endDateTime) && (sessionEnabled) && (privacyState === 'public')); | ||
let filteredEventsCfs = this.filteredEvents.filter(event => { |
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.
Why let and not const?
app/controllers/index.js
Outdated
const endDateTime = callForPapers.get('endsAt'); | ||
const privacyState = callForPapers.get('privacy'); | ||
return (moment().isBetween(startDateTime, endDateTime) && (sessionEnabled) && (privacyState === 'public')); | ||
let filteredEventsCfs = this.filteredEvents.filter(event => { |
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.
You can directly pass isEventCfsOpen
in filter function, no need to create an arrow function
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.
Done
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.
Perfect. Thanks
Fixes #4481
Fixes #4657
Short description of what this resolves:
Some featured events was no longer on start page because they are being queried on the frontend from already existing upcoming events which puts the constraint on the event's date.
Changes proposed in this pull request:
Separately query server for featured events by using
is-featured
filter.Checklist
development
branch.