-
Notifications
You must be signed in to change notification settings - Fork 17
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
Change single page notification button allow list to an exemption list #2356
Conversation
363eb70
to
8f5cb27
Compare
261a816
to
a3ce81e
Compare
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.
Great work, really nice neat Ruby I think - and good catch on the flash and the test.
I wonder if we should add a test to catch the absence of the flash banner?
But generally this is a ✅
Gonna abuse the "request changes" feature to block any accidential merge of this until the 28th, when we've heard back from our last stakeholders.
95adc4f
to
614f431
Compare
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.
Nice work on the new tests
This was missed in the previous PR which added the button to the consultation template. The success message is necessary to indicate when subscribing/unsubscribing to notifications has been completed Update test to verify that the success banner appears as expected on all publication types on which the single page notification button is present.
".app-c-published-dates:last-of-type" is failing because there is now another element after the published dates component.
Change single page notification button allow list to an exemption list. Add tests to verify that pages whose content item is on the exemption list do not display with the single page notification button. Ensure that the button appears only on detailed_guides, publications and consultations and update tests for all other types of publications to check that the button is not included on those types.
4807367
to
6ecd50c
Compare
The next stage for the single page notification rollout is to put the button on all pages with a
publication
,detailed_guide
orconsultation
type.The exemption mechanism will be a denylist. Publishers can request that the button not be included on certain individual pages. The way the exemption is applied is by adding the
content_id
of the page to the single page notification button exclusion list.Implement notification button exemption list:
Change single page notification button allow list to an exemption list.
Switch from using
base_path
s tocontent_id
s for long term stability (content ids persist, base paths can change)Add some basic tests to verify that pages whose content item is on the exemption list do not display with the single page notification button.
Put account flash message on
consultation
:This was missed in the previous PR which added the button to the
consultation
template. The success message is necessary to indicate when subscribing/unsubscribing to notifications has been completed.Fix failing test:
.app-c-published-dates:last-of-type
is failing because there is now another element after the published dates component.The
:last-of-type
selector doesn't work the way one might assume on first glance, as in it doesn't apply to classes the same way that it applies to element selectors.https://stackoverflow.com/questions/13211453/css-how-to-say-classlast-of-type-classes-not-elements
https://trello.com/c/4OWUb0no