fix(ui): make the last five FABs circular

Audited all 76 FloatingActionButton call sites: 65 already passed
shape = CircleShape, five did not and inherited Material3's defaults --
RoundedCornerShape(16.dp) for a regular FAB, 12.dp for a small one. Both read
as rounded squares, which this app uses nowhere.

  MarkdownToolbar x2   SmallFloatingActionButton, the long-form editor's whole
                       toolbar row, which is where they are most visible
  BuzzCanvasScreen x2  plain FABs, no shape
  home/NewChessGameButton  plain FAB, no shape

The convention was only ever held together by copy-paste -- nothing enforced
it, so a FAB written from the Material3 API rather than from a neighbouring
file came out square. That is exactly how the geocaching one went wrong too.

home/NewChessGameButton appears to be an unreferenced duplicate: ChessLobbyScreen
resolves to the same-package chess/ copy, which was already circular. Its shape
is fixed here rather than deleting the file, which is a maintainer's call.

The ten ExtendedFloatingActionButtons are deliberately untouched -- those are
correctly pill-shaped, and a first pass nearly flagged them because the naive
grep matches FloatingActionButton as a substring.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WG7T9hAHDMKPaHsWvqySEr
This commit is contained in:
Claude
2026-09-21 12:09:09 +00:00
parent 9b7e38b710
commit 962d129bd9
3 changed files with 12 additions and 1 deletions
@@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.text.selection.SelectionContainer
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.CircularProgressIndicator
@@ -158,7 +159,7 @@ fun BuzzCanvasScreen(
},
floatingActionButton = {
if (canEdit) {
FloatingActionButton(onClick = { editing = true }) {
FloatingActionButton(onClick = { editing = true }, shape = CircleShape) {
Icon(symbol = MaterialSymbols.Edit, contentDescription = stringRes(Res.string.buzz_canvas_edit))
}
}
@@ -236,6 +237,7 @@ private fun CanvasEditor(
},
floatingActionButton = {
FloatingActionButton(
shape = CircleShape,
onClick = {
val relay =
RelayUrlNormalizer.normalizeOrNull(relayUrl) ?: run {
@@ -21,7 +21,9 @@
package com.vitorpamplona.amethyst.ui.screen.loggedIn.home
import androidx.activity.compose.LocalActivity
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -38,6 +40,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chess.ChessViewModelFactory
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chess.ChessViewModelNew
import com.vitorpamplona.amethyst.ui.stringRes
import com.vitorpamplona.amethyst.ui.theme.Size55Modifier
/**
* Floating action button for creating new chess game challenges
@@ -58,6 +61,9 @@ fun NewChessGameButton(
FloatingActionButton(
onClick = { showDialog = true },
modifier = Size55Modifier,
shape = CircleShape,
containerColor = MaterialTheme.colorScheme.primary,
) {
Icon(
symbol = MaterialSymbols.Add,
@@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SmallFloatingActionButton
import androidx.compose.material3.Text
@@ -123,6 +124,7 @@ private fun ToolbarIconButton(
onClick = onClick,
containerColor = containerColor,
contentColor = contentColor,
shape = CircleShape,
modifier =
Modifier
.size(32.dp)
@@ -159,6 +161,7 @@ private fun ToolbarButton(
onClick = onClick,
containerColor = containerColor,
contentColor = contentColor,
shape = CircleShape,
modifier =
Modifier
.size(32.dp)