Skip to content

feat: rework StudyU app UI#825

Draft
ibrahimozkn wants to merge 13 commits into
devfrom
feat/app-ui-rework
Draft

feat: rework StudyU app UI#825
ibrahimozkn wants to merge 13 commits into
devfrom
feat/app-ui-rework

Conversation

@ibrahimozkn
Copy link
Copy Markdown
Contributor

Problem

The participant app UI was still using a mix of legacy Material defaults, hardcoded colors, and one-off spacing values, which made the experience visually inconsistent across onboarding, dashboard, task, questionnaire, and reporting surfaces.

Changes

  • Apply the StudyU Material 3 theme with branded color roles, button styling, cards, app bars, and OpenSans font support.
  • Restyle participant-facing screens across welcome/onboarding, study selection, dashboard task overview, contact/FAQ, reports, tasks, and questionnaire widgets.
  • Add reusable UI building blocks for the app rework, including WelcomeButton and StudyUSpacing tokens.
  • Update timeline progress, study tiles, task rows, report widgets, selectable buttons, and intervention cards to use theme colors and spacing tokens instead of hardcoded styling.
  • Keep the StudyU design-system skill files on the branch so this PR can land as one integrated UI rework.

Testing

  • dart format --set-exit-if-changed lib
  • flutter analyze --no-pub
  • Full flutter analyze without --no-pub is currently blocked by the repo-level material_color_utilities constraint conflict between Flutter SDK 0.11.1 and studyu_designer_v2 ^0.13.0.
  • Manually review core participant flows: welcome, study selection, dashboard, task completion, questionnaire, report history/details, contact, and FAQ.

- Set explicit brand colors: primary #2196F3, accent #FF9800
- Add Material 3 ColorScheme.fromSeed with white surface, no surface tint
- Add AppBar theme: blue background, white foreground, 20px bold title
- Add Card theme: white, elevation 0, 8px radius, no surface tint
- Add Elevated/Outlined/Text button themes with brand colors, transparent tints
- Set scaffold background to #F5F7FA
dashboard.dart:
- Remove forceMaterialTransparency
- Switch app bar icons to account_circle, bar_chart, more_horiz
- Replace ElevatedButton next-day with styled TextButton link
- Reduce body bottom padding to 48

task_overview.dart:
- Restructure layout: fixed progress row, scrollable content
- Add section titles (Current intervention, Today's tasks) 15px bold
- Build custom intervention card with orange accent dash, info icon
- Add intervention info dialog with baseline description fallback
- Use schedule icon for time rows, 14px blue bold
- Handle null intervention gracefully with SizedBox.shrink

task_box.dart:
- Replace ListTile+RoundCheckbox with UI kit task row layout
- White card, gray checklist icon 40% alpha, 14px title
- Add _CheckCircle widget: orange outlined circle with conditional check
- Locked tasks show lock icon instead of checkbox
- Remove elevation, add explicit white surface color
- Replace complex circular segments with clean timeline bar design
- Run icon start, flag icon end, intervention nodes with connecting lines
- Current node: orange #FF9800 with blue #2196F3 progress ring
- Progress ring shows completed days / total days in current phase
- Past nodes: gray #9E9E9E, future nodes: light gray #CCCCCC
- Active line segments: blue, inactive: light gray
- Declare OpenSans font family in pubspec.yaml
- Add OpenSans-VariableFont_wdth,wght.ttf to assets/fonts/
- Create reusable WelcomeButton with outlined/primary variants
- Replace MDI icons with Material Icons (person, quiz, rocket_launch)
- Reduce logo height from 200 to 70, center layout
- Remove spacer layout in favor of mainAxisSize.min centered column
- Remove material_design_icons_flutter import from welcome screen
study_tile.dart:
- Replace ListTile layout with Card+Row containing circular icon
- Add _StudyIconCircle: 40dp blue circle with white icon
- Use theme colorScheme for text and icons
- Remove hardcoded contentPadding default

selectable_button.dart:
- Use colorScheme.primary/surface/onPrimary instead of hardcoded colors

study_selection.dart:
- Replace MDI icons with Material Icons (warning, vpn_key)
- Use WelcomeButton for invite code button
- Restyle heading: centered headlineMedium, subtitle with underline link
- Use theme colorScheme for hidden studies banner

journey_overview.dart:
- Replace Colors.grey with theme.disabledColor for baseline
- Use colorScheme.onPrimary for icon foreground
contact_screen.dart:
- Wrap logo in Card with padding, add spacing between sections
- Wrap contact sections in Cards with padding
- Refactor ContactWidget: build items via addItem helper
- Replace ListTile-based contact items with InkWell+Row layout
- Add chevron_right icon for tappable items, divider separators
- Use colorScheme.onSurface for text, onSurfaceVariant for labels

faq.dart:
- Deduplicate Scaffold code for en/de languages
- Wrap FAQ entries in Cards with bottom padding
- Style ExpansionTile with theme colors, transparent divider
- Use bodyMedium with 1.35 line height for leaf entries
- Use titleMedium for expandable headers
performance_section.dart:
- Replace hardcoded Colors.red/yellow/green with colorScheme colors
- Use onSurfaceVariant for divider color

report_history.dart:
- Replace Colors.green[600] with colorScheme.primary for active study
- Use onPrimary/onSurface for icon and title text
- Fix null-awareness on activeSubject dereference

average_section_widget.dart:
- Replace hardcoded Colors.blue/orange/grey with colorScheme colors
- Use primaryContainer/secondaryContainer for chart backgrounds
- Use onSurface/outline for chart borders and dots

descriptive_statistics_widget.dart:
- Replace hardcoded Colors.blue/grey/amber with colorScheme colors
- Use primaryContainer for summary box, secondaryContainer for highlights
- Use surfaceContainerHighest for table headers

gauges_widget.dart:
- Replace hardcoded background/border colors with colorScheme
- Use onSurface for needle color and value text

textual_summary_widget.dart:
- Replace hardcoded black Colors with colorScheme.onSurface
- Use theme text styles instead of raw TextStyle
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file app labels May 3, 2026
@ibrahimozkn ibrahimozkn marked this pull request as draft May 3, 2026 13:02
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Visit the preview URL for this PR (updated for commit b5349be):

(expires Sun, 10 May 2026 13:06:24 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2149dad49ed83535217e50d5c18c0c8c90da629b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant