Android overhaul: the §9.6 text and date limits in :core:design's Limits.kt
DESCRIPTION_MAX (S-7 and S-19 each had 100), NOTES_MAX (S-7's 1000 and NotesField's private copy), FIRST_DATE and DAYS_AHEAD_MAX (the S-7 and S-9 date pickers each spelled 2000-01-01 and 365). Values unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -22,9 +22,9 @@ import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.selection.selectableGroup
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.LocalContentColor
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.LocalContentColor
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.getValue
|
||||
@@ -52,10 +52,10 @@ import androidx.compose.ui.semantics.testTag
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.rememberTextMeasurer
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.withStyle
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -65,6 +65,7 @@ import se.hagstedt.kvitt.design.format.AmountKey
|
||||
import se.hagstedt.kvitt.design.format.DateFormatter
|
||||
import se.hagstedt.kvitt.design.format.KvittLanguage
|
||||
import se.hagstedt.kvitt.design.format.MoneyFormatter
|
||||
import se.hagstedt.kvitt.design.format.NOTES_MAX
|
||||
import se.hagstedt.kvitt.design.icon.CheckBadgeIcon
|
||||
import se.hagstedt.kvitt.design.icon.KvittIcon
|
||||
import se.hagstedt.kvitt.design.theme.KvittDimens
|
||||
@@ -255,7 +256,7 @@ fun CategoryQuickRow(categories: List<Category>, selected: CategoryId?, onPick:
|
||||
|
||||
/**
|
||||
* One category item of the quick row or the grid sheet. The check badge of a selected item overhangs the tile's top-right
|
||||
* corner; it is drawn in a layer above the clipped, clickable item so the item's ripple clip never cuts it (M8b).
|
||||
* corner; it is drawn in a layer above the clipped, clickable item so the item's ripple clip never cuts it.
|
||||
*/
|
||||
@Composable
|
||||
fun CategoryItem(category: Category, selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier) {
|
||||
@@ -636,7 +637,6 @@ fun NotesField(value: String, onValueChange: (String) -> Unit, expanded: Boolean
|
||||
)
|
||||
}
|
||||
|
||||
private const val NOTES_MAX = 1000
|
||||
|
||||
/**
|
||||
* The compact row pinned under the app bar when the amount has scrolled away (design-spec §3.7): tile 36,
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
package se.hagstedt.kvitt.design.format
|
||||
|
||||
import kotlinx.datetime.LocalDate
|
||||
|
||||
/** Basis points of a whole: a ratio's per-user shares sum to 10000 bp, 100 % (SPEC §1, §9.3). */
|
||||
const val BP_TOTAL = 10_000
|
||||
|
||||
/** A user's display name is 1 to 40 code points after trimming (SPEC §9.6). */
|
||||
const val DISPLAY_NAME_MAX = 40
|
||||
|
||||
/** An expense's or recurring template's description is 1 to 100 code points (SPEC §9.6). */
|
||||
const val DESCRIPTION_MAX = 100
|
||||
|
||||
/** An expense's notes are 0 to 1000 code points (SPEC §9.6). */
|
||||
const val NOTES_MAX = 1000
|
||||
|
||||
/** The earliest expense or settlement date (SPEC §9.6). */
|
||||
val FIRST_DATE: LocalDate = LocalDate(2000, 1, 1)
|
||||
|
||||
/** The latest expense or settlement date is today plus this many days (SPEC §9.6). */
|
||||
const val DAYS_AHEAD_MAX = 365
|
||||
|
||||
Reference in New Issue
Block a user