-
Notifications
You must be signed in to change notification settings - Fork 0
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
Task/FP-1375: Admin controlled messages #615
Conversation
Codecov Report
@@ Coverage Diff @@
## main #615 +/- ##
==========================================
- Coverage 67.79% 67.79% -0.01%
==========================================
Files 423 426 +3
Lines 13077 13173 +96
Branches 2394 2414 +20
==========================================
+ Hits 8865 8930 +65
- Misses 3921 3951 +30
- Partials 291 292 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM, works as described.
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! Left a few comments, but overall 👍
client/src/components/_common/CustomMessage/CustomMessage.module.scss
Outdated
Show resolved
Hide resolved
@duckonomy Django supports custom migrations, so one way to achieve that could be to deprecate the old model and migrate data over in a single new migration file. We've done something similar in designsafe, though that was a bit simpler |
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.
Marking as "Request Changes" to keep track
I'm not sure how this will affect the existing migrations.. because there is a dependencies = [
('message', '0001_initial'),
] If this doesn't work out, we could rollback from 9681a8b.
|
@duckonomy Yes, just what I was thinking too. We could use |
👍 Created ticket FP-1644 |
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.
Looking great! Just a few more comments
server/portal/apps/message/migrations/0002_custommessages_custommessagetemplate.py
Outdated
Show resolved
Hide resolved
|
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.
@duckonomy Looking great, just a couple more comments!
|
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.
LGTM!
Overview:
Allow arbitrary and dismissable
SectionMessage
generation by admin (throughcore/admin
) for components.Related Jira tickets:
Summary of Changes:
/intromessages/custom/
endpoint (GET
: Get templates & messages,PUT
: Updateunread
state).CustomMessage
UI component as a wrapper aroundSectionMessages
to utilizestate.customMessages
./intromessages/custom/
endpoint.intro
have a dismiss button.Testing Steps:
core_portal_django
container:./manage.py migrate
core/admin
.x
) messages do not show up.core/admin
again.UI Photos:
Screen.Recording.2022-03-24.at.2.14.26.PM.mov
Notes:
intromessages
related components (both frontend/backend) into a more genericmessages
component. But wasn't sure how the migration process would go. Would there be a way to achieve this?info
message type style does not seem to have an icon (SectionMessage
,Message
). Thus, the dismiss button (x
), which is a child of the icon does not render.