-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
[WIP] Notifications app #2967
Closed
Closed
[WIP] Notifications app #2967
Changes from 20 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
20eea61
add inbox app
octavioamu 7ab6e9b
Merge branch 'master' into new-notifications
287b3c4
add initial markup
octavioamu 97b2a72
improve dropdown
octavioamu e2d315f
dynamic shadow
octavioamu 3e2f9a7
change styles
octavioamu 49594fd
backend init
octavioamu a6a8f05
small style changes
octavioamu e28a42d
mockup data
octavioamu 3e6aa8f
fix request logic
octavioamu 3080253
fix login and updates
octavioamu b4972d7
fix loop
octavioamu b6be53b
Changes to backend
be85747
Added username
fd08458
Get data from db
7cbb857
Added created time to data returned
d0b3330
Cleanup
710efeb
Merge pull request #3083 from usmanmuhd/notifs-backend
octavioamu dfb235c
fix shadow safari bug
octavioamu fad9fb9
Changes to notifs backend
6e958e1
Sort the notifs
cfd0469
Fix lint error
195e6ac
more changes
cfe8504
Added delete notification
a2c6716
Lint fixes
c31bd59
Mark read and unread
73640f4
Lint errors fix
74b8bd3
Minor fix
2d50b12
Helper function added
f33c079
Lint fixes
81b246b
Lint fixes
5021197
Lint fixes
0b3e682
Cleanup migrations
f01d9b9
add inbox and changes functions names
octavioamu 2475d7f
url versioning and function name changes
80d93cf
Lint fixes
f6ef416
Merge branch 'new-notifications' into notif-backend
b67d6e9
Merge pull request #3119 from usmanmuhd/notif-backend
octavioamu abdbf37
change url version
octavioamu 403a278
add mark as read
octavioamu e47ac1d
Handled json execptions
15064e8
Added pagination for notifications
476cb70
Merge pull request #3149 from usmanmuhd/notif-pagination
octavioamu 5d25b33
Fix AttributeError in inbox.views
4def040
Merge pull request #3155 from usmanmuhd/notif-fixes
octavioamu 80acc0e
change add read
octavioamu 1dc59cc
Fix in inbox.views
a01df33
Merge pull request #3156 from usmanmuhd/new-notifications
octavioamu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
:root { | ||
--color-notification: 37, 232, 153; | ||
--badge-bg: #D6FBEB; | ||
--badge-text: #00A55E; | ||
--link-color: #3E00FF; | ||
|
||
} | ||
|
||
|
||
.navbar-nav .nav-link.notification__icon { | ||
position: relative; | ||
font-size: 18px; | ||
color: white; | ||
} | ||
|
||
.notification__icon.dropdown-toggle::after { | ||
content: none; | ||
} | ||
|
||
.notification__dot { | ||
background: rgba(var(--color-notification), 1); | ||
display: none; | ||
width: 9px; | ||
height: 9px; | ||
border-radius: 50%; | ||
box-shadow: 0 0 0 rgba(var(--color-notification), .4); | ||
position: absolute; | ||
top: 0.5em; | ||
right: 0.9em; | ||
} | ||
|
||
.notification__dot_active { | ||
display: block; | ||
animation: BadgePulse 1.8s infinite; | ||
} | ||
|
||
.notification__dot-small { | ||
background: rgba(var(--color-notification), 1); | ||
display: block; | ||
width: 7px; | ||
height: 7px; | ||
border-radius: 50%; | ||
opacity: 0; | ||
} | ||
|
||
.notification__dot-small_active { | ||
opacity: 1; | ||
} | ||
|
||
.badge--greenlight { | ||
background-color: var(--badge-bg); | ||
color: var(--badge-text); | ||
} | ||
|
||
.notifications__box { | ||
width: 430px; | ||
border-radius: 3px; | ||
padding: 1em; | ||
max-width: calc(100vw - 2em); | ||
} | ||
|
||
.notifications__link { | ||
color: var(--link-color); | ||
font-size: 0.75rem; | ||
} | ||
|
||
.notifications__header { | ||
display: flex; | ||
justify-content: space-between; | ||
border-bottom: 1px solid #D8D8D8; | ||
padding-bottom: 0.8em; | ||
} | ||
|
||
.notifications__title { | ||
font-size: 0.87rem; | ||
font-weight: 600; | ||
} | ||
|
||
.notifications__list { | ||
font-size: 12px; | ||
max-height: 328px; | ||
overflow-y: auto; | ||
padding: 0; | ||
position: relative; | ||
z-index: 1; | ||
background: #fafafa no-repeat; | ||
background-image: -webkit-radial-gradient(50% 0, farthest-side, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)), -webkit-radial-gradient(50% 100%, farthest-side, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)); | ||
background-image: -moz-radial-gradient(50% 0, farthest-side, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)), -moz-radial-gradient(50% 100%, farthest-side, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)); | ||
background-image: radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0)); | ||
background-position: 0 0, 0 100%; | ||
background-size: 100% 14px; | ||
} | ||
|
||
.notifications__list:before, | ||
.notifications__list:after { | ||
content: ""; | ||
position: relative; | ||
z-index: -1; | ||
display: block; | ||
height: 30px; | ||
margin: 0 0 -30px; | ||
background: -webkit-linear-gradient(top, #fafafa, #fafafa 30%, rgba(255, 255, 255, 0)); | ||
background: -moz-linear-gradient(top, #fafafa, #fafafa 30%, rgba(255, 255, 255, 0)); | ||
background: linear-gradient(to bottom, #fafafa, #fafafa 30%, rgba(255, 255, 255, 0)); | ||
} | ||
|
||
.notifications__list:after { | ||
margin: -30px 0 0; | ||
background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0), #fafafa 70%, #fafafa); | ||
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0), #fafafa 70%, #fafafa); | ||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fafafa 70%, #fafafa); | ||
} | ||
|
||
.notifications__item { | ||
display: flex; | ||
align-items: center; | ||
border-bottom: 1px solid #D8D8D8; | ||
padding: 1em 0; | ||
animation: animateElement linear .3s; | ||
animation-iteration-count: 1; | ||
} | ||
|
||
.notifications__item-readed { | ||
padding: 0.6em 0.8em 0.6em 0; | ||
} | ||
|
||
.notifications__time { | ||
flex: 1 0 68px; | ||
text-align: right; | ||
} | ||
|
||
.notifications_content { | ||
color: #212529; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.notifications_content:hover { | ||
color: #5d666f; | ||
text-decoration: none; | ||
} | ||
|
||
.notifications_content p { | ||
margin-bottom: 0; | ||
} | ||
|
||
.notifications__avatar { | ||
border-radius:50px; | ||
width: 28px; | ||
height: 28px; | ||
margin-right: 1em; | ||
} | ||
|
||
.notifications__button-all { | ||
display: block; | ||
text-align: center; | ||
font-weight: 700; | ||
} | ||
|
||
@keyframes BadgePulse{ | ||
0% { | ||
-moz-box-shadow:0 0 0 0 rgba(37, 232, 153, .4); | ||
-webkit-box-shadow:0 0 0 0 rgba(37, 232, 153, .4); | ||
box-shadow: 0 0 0 0 rgba(37, 232, 153, .4); | ||
} | ||
|
||
70% { | ||
-moz-box-shadow: 0 0 0 10px rgba(37, 232, 153, 0); | ||
-webkit-box-shadow: 0 0 0 10px rgba(37, 232, 153, 0); | ||
box-shadow: 0 0 0 10px rgba(37, 232, 153, 0); | ||
} | ||
|
||
100% { | ||
-moz-box-shadow: 0 0 0 20px rgba(37, 232, 153, 0); | ||
-webkit-box-shadow: 0 0 0 20px rgba(37, 232, 153, 0); | ||
box-shadow: 0 0 0 20px rgba(37, 232, 153, 0); | ||
} | ||
} | ||
|
||
@keyframes animateElement{ | ||
0% { | ||
opacity: 0; | ||
transform: translate(0px,-10px); | ||
} | ||
100% { | ||
opacity: 1; | ||
transform: translate(0px,0px); | ||
} | ||
} | ||
|
||
|
||
.line-clamp { | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
} | ||
|
||
.inbox-list { | ||
background: white; | ||
padding: 6em; | ||
margin-top: -3em; | ||
z-index: 0; | ||
position: relative; | ||
border-radius: 4px; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
E501 line too long (125 > 120 characters)