Skip to content

UX improvements: error states, loading messages, search, and agent welcome - #282

Open
joreilly wants to merge 2 commits into
mainfrom
ux-improvements
Open

UX improvements: error states, loading messages, search, and agent welcome#282
joreilly wants to merge 2 commits into
mainfrom
ux-improvements

Conversation

@joreilly

Copy link
Copy Markdown
Owner

Summary

UX improvements across the app based on recommended changes #1#4, plus bonus polish that naturally fit during the same pass.

Changes

High Impact

1. Error states with real messages

  • Replaced bare Text("Error") with proper error state composables showing an error icon, descriptive title, the actual error message, and a "Retry" button
  • Applied to: ClimateTraceScreen, CountryInfoDetailedView, RankingsScreen

2. Loading states with context

  • Added contextual loading messages alongside progress indicators
  • "Loading global emissions data…", "Loading rankings…", "Loading emissions data…"

3. Toggleable search bar

  • Search bar is now collapsed by default; tapping it expands the full search experience
  • Sort chips (Name/Rank) moved above the search bar so they're always visible
  • Clear button appears when there's active search text

4. Refresh support

  • Extracted data loading into loadCountryData() in CountryListViewModel
  • Added refresh() method so error states can trigger a retry

Medium Impact (Bonus)

5. Agent welcome screen

  • When the chat is empty, shows a welcome card with 4 clickable suggested prompts
  • Prompts auto-fill and send the query on tap

6. "Global Share" label

  • Renamed ambiguous "Share" stat card to "Global Share" for clarity

7. Clickable row indicators

  • Added trailing KeyboardArrowRight chevron to country rows and ranking rows for consistent clickability

8. Treemap selection feedback

  • Selected sector tiles now display a prominent 3dp border (vs 0.5dp default) for clear visual feedback

Verification

  • composeApp:compileKotlinJvm builds successfully with no errors

joreilly and others added 2 commits August 25, 2026 22:52
…lcome

- Error states with real messages, icons, and retry buttons across Climate,
  Country detail, and Rankings screens
- Contextual loading messages (e.g. "Loading global emissions data...")
- Toggleable search bar with sort chips moved above it
- Refresh support in CountryListViewModel for retry functionality
- Agent welcome screen with suggested prompt chips
- Rankings and country rows now show trailing chevron for clickability
- Treemap selection feedback with prominent border highlight
- Renamed "Share" stat card to "Global Share" for clarity

Co-authored-by: Junie <junie@jetbrains.com>
The leadingIcon was changed to a Close button in a previous commit,
which resulted in two X buttons when typing text (one on the left and
one on the right).

- Restore leadingIcon to the standard Search icon
- Make trailingIcon (Close X) always visible in search mode so users
  can exit search even without typing text
- Remove unused AnimatedVisibility/fadeIn/fadeOut imports

Co-authored-by: Junie <junie@jetbrains.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant