Separate show queries towards Arcsi#325
Conversation
pvj
left a comment
There was a problem hiding this comment.
I have one recommendation but even that is just optimisation. So in general good job and I approve. Thank you!
| <template> | ||
| <div v-if="episode" class="latest-arcsi-blokk"> | ||
| <NuxtLink :to="`/shows/${showslug}/${episodeLink}`" class="episode-block relative block w-full mb-2 bg-white"> | ||
| <NuxtLink :to="`/shows/${showSlug}/${episodeSlug}`" class="episode-block relative block w-full mb-2 bg-white"> |
| } | ||
| return null | ||
| arcsiEpisodesSliced () { | ||
| return this.arcsiEpisodes.slice(this.startIndex, this.numberOfEpisodes) |
There was a problem hiding this comment.
👍
The backend can't send anything not archived or without a name_slug right?
| // refresh arcsiShowsForTiles every 10 minutes | ||
| if (minutes % 10 === 0) { | ||
| this.refreshAllShows() | ||
| this.refreshArcsiShowsForTiles() |
There was a problem hiding this comment.
Question about tiles: Is it only going to change when we add new shows or also whenever a new episode is published?
Anyway I think schedule 10 min is okay but hopefully we can be more relaxed about shows tiles after this split, what do you think?
| </div> | ||
|
|
||
| <div v-if="arcsiShow" class="show-infos"> | ||
| <div v-if="this.arcsiShow" class="show-infos"> |
There was a problem hiding this comment.
this. nem kell a templaten belül, elég csak arcsiShow (pl. máshol is
| } | ||
|
|
||
| // refresh arcsiShowsForSchedule every 10 minutes | ||
| if (minutes % 10 === 0) { |
There was a problem hiding this comment.
a két if (minutes % 10 === 0) ugyanaz, össze lehet vonni és egy blokkon belül menjen a két call?
| .slice(this.startIndex, this.numberOfEpisodes) | ||
| } | ||
| return null | ||
| arcsiEpisodesSliced () { |
There was a problem hiding this comment.
lehet érdemes be rakni guardot, mint ahogy volt if (this.arcsiEpisodes) {...} return null vagy if (!this.arcsiEpisodes) return null
| computed: { | ||
| episodeImage() { | ||
| return this.episode.image_url.length > 0 ? this.episode.image_url : this.arcsilist.find(item => item.id === this.episode.shows[0].id).cover_image_url | ||
| return this.episode.image_url.length > 0 ? this.episode.image_url : this.showList.find(show => show.id === this.episode.shows[0].id).cover_image_url |
There was a problem hiding this comment.
ide is érdemes rakni guardot (? a pont elé) find(...)?.cover_image_url hogy ne törjön az egész ha esetleg nem talál matchet és le akarja kérdezni a keyt az undefined-ből
| }, | ||
| created() { | ||
| this.showslug = this.arcsilist.find(item => item.id === this.episode.shows[0].id).archive_lahmastore_base_url | ||
| this.showSlug = this.showList.find(show => show.id === this.episode.shows[0].id).archive_lahmastore_base_url |
There was a problem hiding this comment.
ide is érdemes rakni guardot find(...)?.archive_lahmastore_base_url hogy ne törjön az egész ha esetleg nem talál matchet és le akarja kérdezni a keyt az undefined-ből
| computed: { | ||
| episodeImage() { | ||
| return this.episode.image_url.length > 0 ? this.episode.image_url : this.arcsilist.find(item => item.id === this.episode.shows[0].id).cover_image_url | ||
| return this.episode.image_url.length > 0 ? this.episode.image_url : this.showList.find(show => show.id === this.episode.shows[0].id).cover_image_url |
There was a problem hiding this comment.
ide is érdemes rakni guardot (? a pont elé) find(...)?.cover_image_url hogy ne törjön az egész ha esetleg nem talál matchet és le akarja kérdezni a keyt az undefined-ből
| }, | ||
| created() { | ||
| this.showslug = this.arcsilist.find(item => item.id === this.episode.shows[0].id).archive_lahmastore_base_url | ||
| this.showSlug = this.showList.find(show => show.id === this.episode.shows[0].id).archive_lahmastore_base_url |
There was a problem hiding this comment.
ide is érdemes rakni guardot (? a pont elé) find(...)?.archive_lahmastore_base_url hogy ne törjön az egész ha esetleg nem talál matchet és le akarja kérdezni a keyt az undefined-ből
| <div v-if="defaultArcsiShows" class="mb-8"> | ||
| <AutoCompleteSearch | ||
| :default-items="defaultArcsiShows" | ||
| :defaultShows="defaultArcsiShows" |
There was a problem hiding this comment.
a vue-ban kebab-case kell a komponensek bindingjaira :default-shows="defaultArcsiShows" (régi is default-items volt)
| Node version `=14.18.2` | ||
| Node version `=14.21.3` | ||
|
|
||
| Node Version Manager (.nvmrc) has 14.18.2 as recommended, run `nvm install` and `nvm use` in `app` folder |
There was a problem hiding this comment.
valóban, itt el lett felejtve frissíteni a readme-t az .nvmrc aktuális állapotáról, köszi! viszont akkor ebben a sorban is frissíteni kellene
/all_without_items for eachshow related queries/all_scheduleand/all_tilesendpoints are used for these purposes