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

Add the single page notification button to publication template #2286

Merged
merged 3 commits into from
Nov 24, 2021

Conversation

danacotoran
Copy link
Contributor

@danacotoran danacotoran commented Nov 16, 2021

This adds the Single page notification button to the publication template, after the metadata blocks at the top and bottom of the page.

We only want to launch with a couple of pages in the initial stages, therefore the button will initially show up only on the pages listed on in_single_page_notifications_trial? under content_items_controller.rb

Top Bottom
Screenshot 2021-11-18 at 12 19 40 Screenshot 2021-11-18 at 12 19 51
Screenshot 2021-11-18 at 12 19 08 Screenshot 2021-11-18 at 12 19 25

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 16, 2021 09:45 Inactive
@danacotoran danacotoran force-pushed the add_the_button_to_template branch from 14b35cb to 3602f43 Compare November 16, 2021 11:34
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 16, 2021 11:34 Inactive
@danacotoran danacotoran force-pushed the add_the_button_to_template branch from 3602f43 to 5e963a5 Compare November 17, 2021 15:09
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 17, 2021 15:09 Inactive
@@ -134,6 +134,10 @@ def render_template
return
end

# use these and `@content_item.base_path` in the template
@notification_button_visible = in_single_page_notifications_trial?
Copy link
Member

Choose a reason for hiding this comment

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

These could work as helpers, but I think this is good for now?

@danacotoran danacotoran force-pushed the add_the_button_to_template branch from 5e963a5 to ac34b41 Compare November 17, 2021 17:15
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 17, 2021 17:15 Inactive
@danacotoran danacotoran changed the title [WIP][DO NOT MERGE]Add the button to template [WIP][DO NOT MERGE]Add the button to publication template Nov 18, 2021
@danacotoran danacotoran force-pushed the add_the_button_to_template branch from ac34b41 to 090a832 Compare November 18, 2021 09:49
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 18, 2021 09:49 Inactive
@danacotoran danacotoran changed the title [WIP][DO NOT MERGE]Add the button to publication template Add the single page notification button to publication template Nov 18, 2021
@danacotoran danacotoran force-pushed the add_the_button_to_template branch from 090a832 to a995197 Compare November 18, 2021 11:33
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 18, 2021 11:33 Inactive
@danacotoran danacotoran marked this pull request as ready for review November 18, 2021 12:23
@danacotoran danacotoran changed the title Add the single page notification button to publication template [DO NOT MERGE] Add the single page notification button to publication template Nov 18, 2021
barrucadu and others added 3 commits November 23, 2021 10:13
If we only want to show the button on certain pages, and only have the
javascript behaviour if the user has a session cookie, then we'll need
these controller changes.
This option is necessary to achieve correct spacing when the email
notification button is added after the published_dates component
@barrucadu barrucadu force-pushed the add_the_button_to_template branch from a995197 to 4c883d1 Compare November 23, 2021 10:14
@govuk-ci govuk-ci temporarily deployed to government-f-add-the-bu-tcjdw8 November 23, 2021 10:14 Inactive
@barrucadu barrucadu changed the title [DO NOT MERGE] Add the single page notification button to publication template Add the single page notification button to publication template Nov 23, 2021
@barrucadu barrucadu merged commit dab1815 into main Nov 24, 2021
@barrucadu barrucadu deleted the add_the_button_to_template branch November 24, 2021 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants