-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT/#300] 시스템 점검을 구현합니다. #301
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
Changes from all commits
a0af28f
74eba47
99f30c0
c4eb6a8
9858bb3
82f6db7
dbbb5e4
f8da747
f6ab945
864dcbd
01f2b67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,107 @@ | ||||||||||||||||||||||
| package com.sopt.clody.presentation.ui.component.dialog | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| import androidx.compose.foundation.Image | ||||||||||||||||||||||
| import androidx.compose.foundation.background | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.Box | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.Column | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.Spacer | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.fillMaxSize | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.fillMaxWidth | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.height | ||||||||||||||||||||||
| import androidx.compose.foundation.layout.padding | ||||||||||||||||||||||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||||||||||||||||||||||
| import androidx.compose.material3.Button | ||||||||||||||||||||||
| import androidx.compose.material3.ButtonDefaults | ||||||||||||||||||||||
| import androidx.compose.material3.Card | ||||||||||||||||||||||
| import androidx.compose.material3.CardDefaults | ||||||||||||||||||||||
| import androidx.compose.material3.Text | ||||||||||||||||||||||
| import androidx.compose.runtime.Composable | ||||||||||||||||||||||
| import androidx.compose.ui.Alignment | ||||||||||||||||||||||
| import androidx.compose.ui.Modifier | ||||||||||||||||||||||
| import androidx.compose.ui.graphics.Color | ||||||||||||||||||||||
| import androidx.compose.ui.res.painterResource | ||||||||||||||||||||||
| import androidx.compose.ui.text.style.TextAlign | ||||||||||||||||||||||
| import androidx.compose.ui.unit.dp | ||||||||||||||||||||||
| import androidx.compose.ui.window.Dialog | ||||||||||||||||||||||
| import androidx.compose.ui.window.DialogProperties | ||||||||||||||||||||||
| import com.sopt.clody.R | ||||||||||||||||||||||
| import com.sopt.clody.presentation.utils.base.BasePreview | ||||||||||||||||||||||
| import com.sopt.clody.presentation.utils.base.ClodyPreview | ||||||||||||||||||||||
| import com.sopt.clody.ui.theme.ClodyTheme | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @Composable | ||||||||||||||||||||||
| fun InspectionDialog( | ||||||||||||||||||||||
| inspectionTime: String, | ||||||||||||||||||||||
| onDismiss: () -> Unit, | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Dialog( | ||||||||||||||||||||||
| onDismissRequest = onDismiss, | ||||||||||||||||||||||
| properties = DialogProperties( | ||||||||||||||||||||||
| dismissOnClickOutside = false, | ||||||||||||||||||||||
| dismissOnBackPress = false, | ||||||||||||||||||||||
| usePlatformDefaultWidth = false, | ||||||||||||||||||||||
| ), | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Box( | ||||||||||||||||||||||
| modifier = Modifier | ||||||||||||||||||||||
| .fillMaxSize() | ||||||||||||||||||||||
| .background(Color.Black.copy(alpha = 0.5f)) | ||||||||||||||||||||||
| .padding(horizontal = 24.dp), | ||||||||||||||||||||||
| contentAlignment = Alignment.Center, | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Card( | ||||||||||||||||||||||
| shape = RoundedCornerShape(12.dp), | ||||||||||||||||||||||
| colors = CardDefaults.cardColors(containerColor = ClodyTheme.colors.white), | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Column( | ||||||||||||||||||||||
| modifier = Modifier.padding(20.dp), | ||||||||||||||||||||||
| horizontalAlignment = Alignment.CenterHorizontally, | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Image( | ||||||||||||||||||||||
| painter = painterResource(id = R.drawable.img_inspection_dialog), | ||||||||||||||||||||||
| contentDescription = null, | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| Spacer(modifier = Modifier.height(20.dp)) | ||||||||||||||||||||||
|
Comment on lines
+60
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Provide a meaningful - Image(
- painter = painterResource(id = R.drawable.img_inspection_dialog),
- contentDescription = null,
- )
+ Image(
+ painter = painterResource(id = R.drawable.img_inspection_dialog),
+ contentDescription = stringResource(R.string.desc_inspection_image), // or "" if purely decorative
+ )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| Text( | ||||||||||||||||||||||
| text = "보다 안정적인 클로디 서비스를 위해\n시스템 점검 중이에요. 곧 다시 만나요!", | ||||||||||||||||||||||
| color = ClodyTheme.colors.gray03, | ||||||||||||||||||||||
| textAlign = TextAlign.Center, | ||||||||||||||||||||||
| style = ClodyTheme.typography.body3Medium, | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| Spacer(modifier = Modifier.height(8.dp)) | ||||||||||||||||||||||
| Text( | ||||||||||||||||||||||
| text = "점검시간 : $inspectionTime", | ||||||||||||||||||||||
| color = ClodyTheme.colors.gray04, | ||||||||||||||||||||||
| textAlign = TextAlign.Center, | ||||||||||||||||||||||
| style = ClodyTheme.typography.body3Medium, | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| Spacer(modifier = Modifier.height(24.dp)) | ||||||||||||||||||||||
| Button( | ||||||||||||||||||||||
| onClick = onDismiss, | ||||||||||||||||||||||
| modifier = Modifier | ||||||||||||||||||||||
| .fillMaxWidth(), | ||||||||||||||||||||||
| shape = RoundedCornerShape(8.dp), | ||||||||||||||||||||||
| colors = ButtonDefaults.buttonColors(ClodyTheme.colors.mainYellow), | ||||||||||||||||||||||
| ) { | ||||||||||||||||||||||
| Text( | ||||||||||||||||||||||
| text = "확인", | ||||||||||||||||||||||
| color = ClodyTheme.colors.gray02, | ||||||||||||||||||||||
| style = ClodyTheme.typography.body3SemiBold, | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| @ClodyPreview | ||||||||||||||||||||||
| @Composable | ||||||||||||||||||||||
| private fun PreviewInspectionDialog() { | ||||||||||||||||||||||
| BasePreview { | ||||||||||||||||||||||
| InspectionDialog( | ||||||||||||||||||||||
| inspectionTime = "", | ||||||||||||||||||||||
| onDismiss = {}, | ||||||||||||||||||||||
| ) | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
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.
💡 Verification agent
🧩 Analysis chain
Consider edge cases in time comparison logic.
The current implementation uses
isAfter(start) && isBefore(end), which excludes the exact start and end times. For maintenance windows, you might want to include the boundaries.Additionally, consider timezone implications when using
LocalDateTime.now()if the server and client could be in different timezones.Or more concisely:
Would you like me to search for more information about timezone best practices for maintenance windows?
🌐 Web query:
💡 Result:
When handling timezones in maintenance windows for mobile apps, it's essential to consider user experience, accuracy, and clarity. Here are some best practices:
Use UTC Internally:
Convert to Local Time:
Clear Communication:
Handle Daylight Saving Time (DST):
Send Reminders:
Maintain Consistency:
Consider User Location Changes:
Provide Flexibility:
Test Extensively:
Would you like suggestions on specific libraries or tools to implement these best practices in your mobile app?
Ensure inclusive time checks and normalize to UTC
Please update the inspection‐window logic in app/src/main/java/com/sopt/clody/data/remote/appupdate/AppUpdateCheckerImpl.kt to:
Locations to update:
isUnderInspection()method.Suggested diff:
If your RemoteConfig returns LocalDateTime, convert it:
And when showing maintenance times in‐app, convert back:
This approach:
🤖 Prompt for AI Agents