devinit / DIwebsite-redesign

New DI website 2019
1 stars 1 forks source link

Call to action module - amend so the position is not fixed #1000

Closed SimonMurphyDI closed 3 years ago

SimonMurphyDI commented 3 years ago

Is your feature request related to a problem? Please describe.

At the moment, the location of the call to action module is fixed (at the top of the page). This may not always be where we want it. Is it possible to amend the code of that, so we can insert a call to action into the page - as we might with a photo or a graphic?

It would be good to have this done ahead of possible extra dev work to run the A/B testing on the multi-page publications summary page, and the launch of the GHA report in June - thanks!

SimonMurphyDI commented 3 years ago

Hello, we've had an update that the GHA report will go live early on Tuesday 22 June, and we will need this development final before that moment, ideally during w/c 14th so this can be part of that upload. Thanks! Simon

SimonMurphyDI commented 3 years ago

Hi @edwinmp I know you've been on leave - do you think it's possible to have this change made in time for launch? It would help us plan how we publish the page next week Best Simon

edwinmp commented 3 years ago

Hi @SimonMurphyDI ... just got back from leave. Will schedule this for today.

edwinmp commented 3 years ago

@SimonMurphyDI for publication pages, do you want the call to action module to be full width or centred?

image

I've added this on every page that has a stream field & have left the old version untouched so existing usages won't be affected. You can let me know when to remove it once all usages have been migrated to the stream field version, though it'll probably happen gradually.

SimonMurphyDI commented 3 years ago

Thanks Edwin - happy for it to remain as it presently is, which I think is full width? Agree on how you've implemented, but I think that would mean that the CTA would not appear on the publication summary page? Is there a way that we'd be able to add one there too? Best Simon

edwinmp commented 3 years ago

Summary pages have a StreamField too so it'll appear there as well. Actually, I can't think of any page it won't appear on, but let me know if the need arises again in the future. Let me deploy to staging for you to test.

SimonMurphyDI commented 3 years ago

Amazing

edwinmp commented 3 years ago

@SimonMurphyDI this is deployed to dev for testing

SimonMurphyDI commented 3 years ago

Thanks @edwinmp - checking this now but I think we got our wires crossed slightly. By 'summary' i meant the publication summary page, like this one: https://devinit.org/resources/global-humanitarian-assistance-report-2020/ This pulls content through from the chapters, and I think it also automatically populates all child pages with an identical CTA.

The position of the CTA on that summary page is fixed but we'd ideally like (a) to have the option of having a CTA at the top or at the bottom of the summary page (b) to amend the code so it's optional as to whether the same CTA then appear across all child pages.

Is that possible to do in the time we have? And is there any risk with any pages that are in progress? (we've got a lot of the GHA content uploaded already)

DO let me know if a chat would be easier :)

edwinmp commented 3 years ago

Hi @SimonMurphyDI, thanks for the feedback ... yes, for the Summary page, it can only be the top or button. Will get it done. Let me try to get both done by end of day today, but latest should be end of tomorrow. Hope that fits within the accepted timeframe ...

edwinmp commented 3 years ago

@SimonMurphyDI the changes above are deployed on dev ... for the summary page, I moved the CTA to the bottom and allowed up to 2 items with a position property (top, bottom or both). Also added an inherit property but forgot to use it in code so now child pages inherit all CTAs of the parent. Will fix that on Monday.

edwinmp commented 3 years ago

Yeah, It's slow to load, but it loads ... https://dev.devinit.org/admin/pages/2098/edit/

SimonMurphyDI commented 3 years ago

Thanks Edwin - on the page you've shared it's set to show a CTA at the top, but it's not showing when I preview the page?

edwinmp commented 3 years ago

You're right ... could you please test to make sure it's showing up on the child pages ... I think I implemented it on those and broke the main one in the process. https://dev.devinit.org/admin/pages/2098/

edwinmp commented 3 years ago

@SimonMurphyDI this is now fixed ... you'll need to check inherit for the CTA to be shown in child pages ... may not be a likely use case (not inheriting), but I think it's safe to have the option https://dev.devinit.org/admin/pages/2098/edit/

SimonMurphyDI commented 3 years ago

Thanks Edwin, Looks good! Before you deploy can you confirm

edwinmp commented 3 years ago

@SimonMurphyDI this won't impact any pre-existing resources. As for pre-existing CTAs on summary pages (they're the only ones affected), they'll be automatically migrated to the new format. Only problem I foresee is the inheritance ... let me make the inherit property default to true and we should be good to go.

SimonMurphyDI commented 3 years ago

OK thanks Edwin - let me know how it goes and when we can upload the CTA to the current live+private content