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

Tasawer/242/site notifications #309

Merged
merged 1 commit into from May 22, 2019
Merged

Conversation

tasawernawaz
Copy link

@tasawernawaz tasawernawaz commented May 20, 2019

Pre-Flight checklist

  • Screenshots and design review for any changes that affect layout or styling
    • Desktop screenshots
    • Mobile width screenshots
    • Tag @Ferdi or @pdpinch for review
  • Migrations
    • Migration is backwards-compatible with current production code
  • Testing
    • Code is tested
    • Changes have been manually tested

What are the relevant tickets?

Fixes #242

What's this PR do?

Add feature for site notifications.

How should this be manually tested?

  • Add new notification through cms/snippets/cms/sitenotification/
  • Visit any page, you should see notification.
  • Notification should disappear for the rest of the session.

Any background context you want to provide?

RFC: #306

Screenshots (if appropriate)

Wagtail:
Screen Shot 2019-05-20 at 4 01 14 PM

Rendered:
Screen Shot 2019-05-20 at 4 00 38 PM

Out of scope:

  • date range between which the content should be displayed
  • ensure that only one site wide notification can be displayed at once (@pdpinch I'm guessing we want this to avoid overwhelming the user?)

@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 20, 2019 11:02 Inactive
@codecov-io
Copy link

codecov-io commented May 20, 2019

Codecov Report

Merging #309 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #309      +/-   ##
==========================================
+ Coverage   94.03%   94.05%   +0.01%     
==========================================
  Files         170      171       +1     
  Lines        5771     5787      +16     
  Branches      342      343       +1     
==========================================
+ Hits         5427     5443      +16     
  Misses        280      280              
  Partials       64       64
Impacted Files Coverage Δ
mitxpro/templatetags/render_notification.py 100% <100%> (ø)
cms/models.py 93.02% <100%> (+0.4%) ⬆️
cms/factories.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51eaf36...d999e8f. Read the comment docs.

@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 20, 2019 11:16 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 20, 2019 11:31 Inactive
@tasawernawaz tasawernawaz mentioned this pull request May 20, 2019
12 tasks
@tasawernawaz tasawernawaz force-pushed the tasawer/242/site-notifications branch from 4441761 to d2a69f7 Compare May 20, 2019 11:38
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 20, 2019 11:38 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 20, 2019 11:55 Inactive
@rhysyngsun rhysyngsun self-assigned this May 20, 2019
mitxpro/templatetags/render_notification.py Outdated Show resolved Hide resolved
mitxpro/templatetags/render_notification.py Outdated Show resolved Hide resolved
mitxpro/templatetags/render_notification.py Outdated Show resolved Hide resolved
static/js/notifications.js Outdated Show resolved Hide resolved
cms/models.py Outdated Show resolved Hide resolved
@tasawernawaz tasawernawaz force-pushed the tasawer/242/site-notifications branch from b8d012f to d4e0999 Compare May 21, 2019 07:28
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 21, 2019 07:28 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 21, 2019 07:55 Inactive
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 21, 2019 08:24 Inactive
@tasawernawaz tasawernawaz force-pushed the tasawer/242/site-notifications branch from 7da90a5 to ecbee11 Compare May 21, 2019 08:40
@odlbot odlbot temporarily deployed to xpro-ci-pr-309 May 21, 2019 08:41 Inactive
Copy link
Collaborator

@rhysyngsun rhysyngsun left a comment

Choose a reason for hiding this comment

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

Generally looking good, just a few small things.

static/js/notifications.js Outdated Show resolved Hide resolved
cms/models.py Outdated Show resolved Hide resolved
@tasawernawaz
Copy link
Author

@rhysyngsun Suggestions applied.

@tasawernawaz tasawernawaz merged commit 60b4df3 into master May 22, 2019
@tasawernawaz tasawernawaz deleted the tasawer/242/site-notifications branch May 22, 2019 11:17
@odlbot odlbot mentioned this pull request May 22, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site-wide notifications
6 participants