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

Featured content on homepage doesn't match V1 featured content #645

Closed
9 tasks done
geoo89 opened this issue Oct 11, 2021 · 9 comments · Fixed by #671 or #673
Closed
9 tasks done

Featured content on homepage doesn't match V1 featured content #645

geoo89 opened this issue Oct 11, 2021 · 9 comments · Fixed by #671 or #673

Comments

@geoo89
Copy link
Contributor

geoo89 commented Oct 11, 2021

New specification of desired behavior:

Footers:

  • Convert V1 footers to V2 articles and add them to the V2 footer index page
  • Add V1 surveys/polls from their index page to the respective V2 index page, and additionally as PageLinks (see Add a PageLink Page to Footer Index Page #663) to the V2 footer index page

Featured content:

  • Add articles with 'Featured in homepage start date' to the V2 featured content
    • Only articles that are LIVE
    • Sort articles by top-level section, with 'Featured in homepage start date' as tie-breaker
    • Translated articles inherit the 'Featured in homepage start date' from the English version (if it is not set) and go to the featured content of their respective locale
  • Add V1 surveys/polls from their index page to the V2 featured content (at the end of the list).
    • Only questionnaires that are LIVE
    • Featured V1 Polls should be displayed directly (i.e. embedded)
    • Featured V1 Surveys should be linked or displayed directly, depending on their direct display flag
    • To achieve this, the embedded survey/poll/quiz content block (which is also used in articles) should have an additional field (flag) indicating whether to display a link to the s/p/q or embed it directly. (This is needed as in V2 we can also feature s/p/q that are not in the index page, and thus might want to override their direct display flag, which determines how they show up in their section).

Current state (outdated):

  • All featured homepage content ends up on the English homepage, rather than being on the homepage of the appropriate language --> Move pages to their respective locale
  • Pages in draft state appear in featured content -> don't show these (this is not migration related)
  • Banners don't appear (Any banner that's not in draft state appears in V1) --> Add these to features banners during migration
  • Featured polls/surveys don't appear (Any survey/poll in the respective index page that's not in draft state appears in V1; this also respects their 'direct display' flag) --> Add these to the list of featured content
  • Footers: why does Terms and Conditions not appear as a footer on https://www.internetofgoodthings.org/? Which setting determines this?
@cbunicef
Copy link
Collaborator

cbunicef commented Oct 12, 2021

Banners don't appear (I believe any banner that's not in draft state appears in V1)

Yes that seems the same to me.

Featured footers/surveys/polls don't appear (I don't know which setting is used to make e.g. surveys/polls at the bottom appear at https://www.internetofgoodthings.org/)

  1. Polls/surveys appear via links in the footer if they are LIVE in the "Surveys" and "Polls" subsections below the homepage.
  2. Polls/surveys ALSO appear embedded in the homepage if they are LIVE in those subsections and "Display Question Directly" is selected.

From a standpoint of how the homepage appears, for V2 we would want EITHER 1 or 2 but not both. The settings which achieve that will of course be different in V2.

@geoo89
Copy link
Contributor Author

geoo89 commented Oct 13, 2021

V2 currently only allows embedded questionnaires on the homepage. For polls that probably makes sense as a default, but for surveys and quizzes it might be more sensible to have page links instead?

--> Respect the 'direct display' flag and display accordingly

@geoo89
Copy link
Contributor Author

geoo89 commented Oct 14, 2021

All featured homepage content ends up on the English homepage, rather than being on the homepage of the appropriate language

I can't make sense of how this is done in V1. Example:

Footers: why does Terms and Conditions not appear as a footer on https://www.internetofgoodthings.org/? Which setting determines this?

I can't make sense of this either.

@cbunicef any insights?

@cbunicef
Copy link
Collaborator

V2 currently only allows embedded questionnaires on the homepage. For polls that probably makes sense as a default, but for surveys and quizzes it might be more sensible to have page links instead?

--> Respect the 'direct display' flag and display accordingly

Let's continue to give administrators the flexibility to embed questionnaires on any section via "Direct Display".

@cbunicef
Copy link
Collaborator

cbunicef commented Oct 14, 2021

All featured homepage content ends up on the English homepage, rather than being on the homepage of the appropriate language

I can't make sense of how this is done in V1. Example:

Had to do a lot of testing on this one, but I'm pretty sure the answer in the end is simple. There are only X (looks like 5) possible promoted articles per top-level section eg "Youth". The X most recent promoted articles are shown. In sections with fewer than X promoted articles only those promoted are shown, eg "COVID-19" section.

Promoted articles dates inherit from the main language, and empty or different promotion dates on the translation pages don't have an impact.

The content is different between languages because the newer articles which are promoted in English aren't translated to Russian, so on the Russian page only the most recent articles with translation are shown.

One thing I don't understand is that even though I've added a recent promotion date to this article, it doesn't appear on the homepage.

Footers: why does Terms and Conditions not appear as a footer on https://www.internetofgoodthings.org/? Which setting determines this?

I can't make sense of this either.

@cbunicef any insights?

I've tested a number of things was also stumped. In the end I copied the Page, changed slugs so that it has the same URL as the original T&Cs Page. That new Page appears in the footer. Maybe some bad data in the database?

@geoo89
Copy link
Contributor Author

geoo89 commented Oct 15, 2021

Thanks, that is helpful. Should we also truncate at 5 articles per section for the purpose of migration, or display all of them? It is extremely fast to deleted unwanted featured content, so maybe having all of them it safer?

For the T&Cs, could it be that the slug is hard-coded not to be displayed? Either way, I suggest we migrate all footers for now?

@geoo89
Copy link
Contributor Author

geoo89 commented Oct 20, 2021

Reopening as some tasks are still to be done.

@geoo89 geoo89 reopened this Oct 20, 2021
@cbunicef
Copy link
Collaborator

Translated articles inherit the 'Featured in homepage start date' from the English version (if it is not set) and go to the featured content of their respective locale

Noting that this should be from MAIN language, not English

Thanks, that is helpful. Should we also truncate at 5 articles per section for the purpose of migration, or display all of them? It is extremely fast to deleted unwanted featured content, so maybe having all of them it safer?

It wouldn't be related to migration, but we should have max 5 promoted articles per section displayed.

For the T&Cs, could it be that the slug is hard-coded not to be displayed? Either way, I suggest we migrate all footers for now?

I meant that when I made a copy of the Footer Page, and changed it to the original slug name, it displayed:

image

I don't think there was anything preventing the Footer Page from being listed, except that it was that particular unique Footer Page. So maybe a database error somewhere, but fixed now by creating the new copy.

@geoo89
Copy link
Contributor Author

geoo89 commented Oct 27, 2021

This is done, modulo footer issues which are tracked in #732

@geoo89 geoo89 closed this as completed Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants