fix: v0.3.0.1 — editor chip-row to bottom + centred colour picker + hashtags on list cards + dog-ear colour accent

Urgent UI polish patch on top of v0.3.0.0.

EDITOR (NoteEditorScreen.kt)
  - Drop the '+ add' chip from the hashtag row. The '#' icon in the
    top bar is now the only way to add tags.
  - Move the hashtag chip row to the bottom of the editor. The text
    field now uses weight(1f) instead of fillMaxSize() so the row stays
    visible below it.
  - Hide the chip row entirely when the note has no hashtags (no 'No
    tags' placeholder).
  - Centre the colour picker horizontally. Switched from a left-aligned
    LazyRow to a plain Row with Arrangement.spacedBy(12.dp,
    Alignment.CenterHorizontally).

LIST CARDS (NoteListScreen.kt)
  - Replace the small 10 dp colour circle chip (next to the star) with
    a 'dog-ear' colour accent overlaid on the top-right corner of the
    card (a 28 dp right-triangle filled with the note's colour).
  - Add a hashtag row to each card. Shows up to three tags as a
    FlowRow of label-styled text; an '+N' indicator appears when
    there are more than three. Hidden when the note has no tags.
  - Wrap the Card in a Box so the dog-ear can be aligned to
    Alignment.TopEnd.

VERSION + DOCS
  - app/build.gradle.kts: versionCode 5 → 6, versionName '0.3.0.0' →
    '0.3.0.1'. The MAJOR.MINOR.MAINTENANCE.EMERGENCY scheme validator
    remains in place.
  - README.md changelog: new 0.3.0.1 row.
  - Incido Development Plan.txt §10: new 0.3.0.1 row.

VERIFIED
  - ./gradlew assembleDebug assembleRelease both green.
  - Debug 25.7 MB, release 19.8 MB.
  - versionCode=6, versionName='0.3.0.1'.
  - No INTERNET permission in either APK.
  - Release signed (v2 scheme).
This commit is contained in:
Incido Developer committed 2026-08-15 02:46:17 +12:00
1 parent d616ce3021
commit dbc4e7acba
5 files changed
+112 -77

No files matched your search

+1
View File
@@ -374,6 +374,7 @@ A short reference for AI assistants:
| 0.2.0.0 | 2026-08-14 | Polish + first Keep-parity features. Discard-confirm dialog; release signing config (dev keystore). Favorites (renamed from Pinned Notes), full-text search, 6 colour-coded notes, inline GFM checklists (open/done counts). ObjectBox KMP migration deferred to v0.5 (tracked). |
| 0.2.0.1 | 2026-08-14 | Hotfix: search-active flag folded into uiState so the search icon actually opens the field. |
| 0.3.0.0 | 2026-08-14 | Hashtags (separate entity + cross-ref, 5-tag cap, autocomplete, persistent chips on editor, search() also matches tag names) + bolder colour accent (14 dp gradient stripe + tinted card background + corner chip) + nav drawer (Home / Favorites / Untagged + recent tags) + centred app-bar title + new version scheme adopted (validator in app/build.gradle.kts). |
| 0.3.0.1 | 2026-08-14 | Urgent UI polish: editor hashtag row moved to the bottom (and hidden when empty), `+ add` chip removed (use `#` icon in top bar), colour picker centred horizontally, list-card dog-ear colour accent replaces the small circle chip, list cards show a hashtag row (with `+N` abbreviation when capped). |
---
+1
View File
@@ -108,6 +108,7 @@ cross-platform ports, end-to-end sync, and security features.
| 0.2.0.0 | 2026-08-14 | Polish + favourites, search, colours, checklists, discard dialog, release signing |
| 0.2.0.1 | 2026-08-14 | Hotfix: search icon now actually opens the search bar |
| 0.3.0.0 | 2026-08-14 | Hashtags (visible chips on editor, 5-tag cap, autocomplete) + bolder colour accent + nav drawer (Home / Favorites / Untagged + recent tags) + centred app-bar title + new version scheme |
| 0.3.0.1 | 2026-08-14 | Urgent UI polish: editor hashtag row moved to the bottom (and hidden when empty), `+ add` chip removed (use `#` icon in top bar), colour picker centred horizontally, list-card dog-ear colour accent replaces the small circle chip, list cards show a hashtag row (with `+N` abbreviation when capped). |
---
+2 -2
View File
@@ -28,8 +28,8 @@ android {
applicationId = "org.incido.app"
minSdk = 26
targetSdk = 35
versionCode = 5
versionName = "0.3.0.0"
versionCode = 6
versionName = "0.3.0.1"
}
// --- Signing ---
@@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
@@ -17,12 +18,10 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Done
@@ -32,7 +31,6 @@ import androidx.compose.material.icons.filled.Tag
import androidx.compose.material.icons.outlined.StarOutline
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.AssistChip
import androidx.compose.material3.AssistChipDefaults
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
@@ -57,6 +55,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.focus.FocusRequester
@@ -211,25 +210,18 @@ fun NoteEditorScreen(
.fillMaxSize()
.padding(padding),
) {
HashtagChipRow(
tags = state.hashtags,
canAddMore = state.canAddMoreTags,
onAddClick = { viewModel.openAddTagSheet() },
onRemove = { viewModel.removeTag(it) },
)
// Colour-picker row above the editor text field.
LazyRow(
// v0.3.0.1: colour picker centred horizontally (was left-aligned
// LazyRow in v0.3.0.0). Six fixed entries → plain Row, no LazyRow.
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 4.dp),
horizontalArrangement = Arrangement.spacedBy(12.dp),
horizontalArrangement = Arrangement.spacedBy(
space = 12.dp,
alignment = Alignment.CenterHorizontally,
),
) {
items(
count = AllNoteColors.size,
key = { idx -> AllNoteColors[idx].storageKey.toInt() },
) { idx ->
val color = AllNoteColors[idx]
AllNoteColors.forEach { color ->
ColorSwatch(
color = color,
selected = state.color == color,
@@ -238,13 +230,16 @@ fun NoteEditorScreen(
}
}
// v0.3.0.1: text field takes remaining vertical space via
// weight(1f) instead of fillMaxSize() so the chip row below
// it stays visible at the bottom.
OutlinedTextField(
value = state.content,
onValueChange = viewModel::onContentChange,
modifier = Modifier
.fillMaxSize()
.weight(1f)
.fillMaxWidth()
.padding(horizontal = 16.dp)
.padding(bottom = 16.dp)
.focusRequester(focusRequester),
placeholder = { Text("Write something…") },
keyboardOptions = KeyboardOptions(
@@ -252,6 +247,15 @@ fun NoteEditorScreen(
imeAction = ImeAction.Default,
),
)
// v0.3.0.1: hashtag chip row now sits at the bottom of the
// editor. Hidden entirely when the note has no tags — the `#`
// icon in the top bar is the only way to add tags (no `+ add`
// chip anymore).
HashtagChipRow(
tags = state.hashtags,
onRemove = { viewModel.removeTag(it) },
)
}
}
@@ -280,11 +284,12 @@ fun NoteEditorScreen(
@Composable
private fun HashtagChipRow(
tags: List<String>,
canAddMore: Boolean,
onAddClick: () -> Unit,
onRemove: (String) -> Unit,
) {
if (tags.isEmpty() && !canAddMore) return
// v0.3.0.1: hide the row entirely when there are no hashtags. The
// user opens the add-tag sheet via the `#` icon in the top bar; the
// row only appears once at least one tag is present.
if (tags.isEmpty()) return
FlowRow(
modifier = Modifier
.fillMaxWidth()
@@ -292,13 +297,6 @@ private fun HashtagChipRow(
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalArrangement = Arrangement.spacedBy(4.dp),
) {
if (tags.isEmpty()) {
Text(
text = "Tags",
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
tags.forEach { tag ->
AssistChip(
onClick = { onRemove(tag) },
@@ -308,21 +306,10 @@ private fun HashtagChipRow(
},
)
}
if (canAddMore) {
AssistChip(
onClick = onAddClick,
label = { Text("+ add") },
leadingIcon = { Icon(Icons.Filled.Add, contentDescription = null, modifier = Modifier.size(16.dp)) },
colors = AssistChipDefaults.assistChipColors(
labelColor = MaterialTheme.colorScheme.primary,
leadingIconContentColor = MaterialTheme.colorScheme.primary,
),
)
}
}
}
@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class)
@Composable
private fun AddTagSheet(
tagInput: String,
@@ -360,9 +347,8 @@ private fun AddTagSheet(
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
LazyRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
items(count = suggestions.size, key = { idx -> suggestions[idx] }) { idx ->
val s = suggestions[idx]
FlowRow(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
suggestions.forEach { s ->
SuggestionChip(
onClick = { onPickSuggestion(s) },
label = { Text("#$s") },
@@ -4,6 +4,8 @@ import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@@ -13,7 +15,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.GenericShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.CheckBox
@@ -41,9 +43,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.lerp
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@@ -55,6 +55,19 @@ import org.incido.domain.model.Note
import org.incido.domain.model.NoteColor
import org.incido.domain.model.NoteFilter
/**
* Right-triangle that fills the top-right corner of its bounds — a
* "dog-ear" / folded-page effect used to mark the note's colour.
*/
private val DogEarShape = GenericShape { size, _ ->
// Right-triangle anchored to the top-right corner: vertices at
// (0, 0), (size.width, 0), (size.width, size.height).
moveTo(0f, 0f)
lineTo(size.width, 0f)
lineTo(size.width, size.height)
close()
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun NoteListScreen(
@@ -66,7 +79,6 @@ fun NoteListScreen(
val state by viewModel.uiState.collectAsStateWithLifecycle()
var localQuery by remember { mutableStateOf("") }
// Keep the ViewModel in sync with the parent's filter selection.
LaunchedEffect(filterMode) { viewModel.setFilter(filterMode) }
Scaffold(
@@ -84,14 +96,13 @@ fun NoteListScreen(
if (state.isSearchActive) viewModel.closeSearch() else viewModel.openSearch()
localQuery = ""
}) {
Icon(Icons.Filled.Search, contentDescription = "Search notes")
Icon(Icons.Default.Search, contentDescription = "Search notes")
}
}
},
)
},
floatingActionButton = {
// FAB only on Home — adding notes while filtered makes less sense.
if (filterMode == NoteFilter.Home) {
FloatingActionButton(onClick = { onOpenEditor(null) }) {
Icon(Icons.Default.Add, contentDescription = "New note")
@@ -209,11 +220,14 @@ private fun NoteList(
}
/**
* v0.3.0.0 card redesign — three-layer colour accent so notes of
* different colours are visually distinct at a glance:
* 1. 14 dp vertical gradient stripe down the left edge.
* 2. Tinted card surface (12 % colour blend over the M3 surface).
* 3. 10 dp solid colour chip in the top-right corner.
* v0.3.0.1 card layout:
* - 14 dp vertical gradient stripe down the left edge
* - Tinted card surface (12 % colour blend over the M3 surface)
* - Dog-ear colour accent in the top-right corner (replaces the old
* circle chip next to the star)
* - Title + body preview + checklist summary + hashtag row +
* timestamp / delete
* - Hashtag row is hidden entirely when the note has no tags.
*/
@Composable
private fun NoteCard(
@@ -228,6 +242,7 @@ private fun NoteCard(
val noteColor = note.color
val hasColor = noteColor != NoteColor.NONE
Box(modifier = Modifier.fillMaxWidth()) {
Card(
onClick = onClick,
modifier = Modifier.fillMaxWidth(),
@@ -243,7 +258,6 @@ private fun NoteCard(
) {
Row(modifier = Modifier.fillMaxWidth()) {
if (hasColor) {
// Layer 1: 14 dp gradient stripe.
Box(
modifier = Modifier
.size(width = 14.dp, height = 110.dp)
@@ -269,16 +283,8 @@ private fun NoteCard(
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f),
)
// Layer 3: top-right colour chip (only when coloured).
if (hasColor) {
Box(
modifier = Modifier
.size(10.dp)
.clip(CircleShape)
.background(noteColor.toComposeColor()),
)
Spacer(modifier = Modifier.size(8.dp))
}
// v0.3.0.1: small circle chip removed — the
// dog-ear below is now the colour indicator.
IconButton(onClick = onToggleFavorite) {
Icon(
imageVector = if (note.isFavorite) Icons.Filled.Star else Icons.Outlined.StarOutline,
@@ -315,6 +321,10 @@ private fun NoteCard(
)
}
}
if (note.hashtags.isNotEmpty()) {
Spacer(modifier = Modifier.padding(top = 4.dp))
HashtagRow(hashtags = note.hashtags)
}
Spacer(modifier = Modifier.padding(top = 8.dp))
Row(
modifier = Modifier.fillMaxWidth(),
@@ -337,13 +347,50 @@ private fun NoteCard(
}
}
}
// v0.3.0.1: dog-ear colour accent overlays the top-right corner.
if (hasColor) {
Box(
modifier = Modifier
.align(Alignment.TopEnd)
.size(28.dp)
.background(
color = noteColor.toComposeColor(),
shape = DogEarShape,
),
)
}
}
}
// --- Lightweight imports used to avoid shadowed-name conflicts in
// other files that might also import these symbols ---
@Suppress("unused")
private fun clip(@Suppress("UNUSED_PARAMETER") shape: androidx.compose.ui.graphics.Shape): Modifier =
Modifier.clip(shape)
@Suppress("unused")
private fun background(color: Color): Modifier = Modifier.background(color)
/**
* v0.3.0.1: hashtag list on the card. Shows up to three tags as a
* compact FlowRow of label-styled text; if there are more, renders a
* "+N" abbreviation indicator. Hidden entirely by the caller when
* [hashtags] is empty.
*/
@OptIn(ExperimentalLayoutApi::class)
@Composable
private fun HashtagRow(hashtags: List<String>) {
val visible = hashtags.take(3)
val overflow = hashtags.size - visible.size
FlowRow(
horizontalArrangement = Arrangement.spacedBy(6.dp),
verticalArrangement = Arrangement.spacedBy(2.dp),
) {
visible.forEach { tag ->
Text(
text = "#$tag",
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.primary,
)
}
if (overflow > 0) {
Text(
text = "+$overflow",
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
}
}
}