-
Notifications
You must be signed in to change notification settings - Fork 0
Fixing user alerts #244
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
Fixing user alerts #244
Conversation
…identally omitted
Changed Files
|
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.
Pull request overview
This PR fixes user alerts not being displayed due to incorrect template block structure. The main issue was that messages and notifications were rendered inside the {% block body %} in base.html, which meant child templates that overrode this block wouldn't display alerts.
Changes:
- Moved message and notification rendering in base.html outside the body block to ensure they appear on all pages
- Added support for "danger" tag in toast component to align with Bootstrap conventions
- Restructured file_list.html template blocks (changed from
bodytocontentblock) - Updated allauth alert styling to use Bootstrap's standard
alert-dangerclass
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| gateway/sds_gateway/users/mixins.py | Added extra_tags="danger" to error message for Bootstrap compatibility |
| gateway/sds_gateway/templates/users/file_list.html | Restructured template blocks and added CSS/JS resources |
| gateway/sds_gateway/templates/users/components/toast.html | Added support for "danger" type and increased toast display duration |
| gateway/sds_gateway/templates/base.html | Moved messages/notifications outside body block and added Font Awesome globally |
| gateway/sds_gateway/templates/allauth/elements/alert.html | Changed from alert-error to Bootstrap-standard alert-danger class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
klpoland
left a comment
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.
Yes, I noticed this too and didn't get around to fixing it. Thanks for cleaning this up.
User alerts weren't being displayed in most situations due to an incorrect block override in the template.