feat: add maintenance notice modal and configuration options#364
Merged
feat: add maintenance notice modal and configuration options#364
Conversation
…ce user experience during scheduled maintenance
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This pull request introduces a new, configurable Maintenance Notice Modal to the application, allowing administrators to inform users of scheduled maintenance via a prominent overlay. The modal supports custom scheduling, dismissals (persisted per user and schedule), and rich text formatting. Additionally, related configuration, styling, and component exports have been updated to support this feature.
Maintenance Notice Modal Feature:
MaintenanceNoticeModalReact component that displays a modal overlay for scheduled maintenance, with support for custom text, bold formatting, and persistent dismissal per user and schedule. (app/components/MaintenanceNoticeModal.tsx)MaintenanceNoticeModalinto the main application layout so it appears globally when enabled. (app/components/AppLayout.tsx) [1] [2]MaintenanceNoticeModalfrom the central component index for easier reuse/imports. (app/components/index.ts)Configuration:
.env.exampleto control enabling the maintenance modal and to set the maintenance schedule, with documentation for usage. (.env.example)Styling:
app/globals.css,tailwind.config.ts) [1] [2]MUST SET THE ENV VARIABLES FOR THIS MAINTAINANCE NOTICE TO SHOW
YOU CAN SEE WHAT DETAILS TO ADD IN THE ENV.EXAMPLE, BUT HERE THEY ARE AGAIN
NEXT_PUBLIC_MAINTENANCE_NOTICE_ENABLED=true
NEXT_PUBLIC_MAINTENANCE_SCHEDULE=Friday, February 13th, from 7:00 PM to 11:00 PM WAT
References
Testing
Checklist
mainBy submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.