Skip to content

feat(frontend): dark-tech UI polish + map/local-view aspect improvements#131

Open
xiaolefang-dm wants to merge 4 commits into
mainfrom
xiaole/fix/camera-cover-fit
Open

feat(frontend): dark-tech UI polish + map/local-view aspect improvements#131
xiaolefang-dm wants to merge 4 commits into
mainfrom
xiaole/fix/camera-cover-fit

Conversation

@xiaolefang-dm
Copy link
Copy Markdown
Contributor

@xiaolefang-dm xiaolefang-dm commented May 1, 2026

Summary

This PR extends xiaole/fix/camera-cover-fit with a full frontend visual polish and layout fixes for better usability and consistency.

Included changes

  1. Keep camera preview fill behavior

    • Uses BoxFit.cover to make camera preview fill its panel cleanly.
  2. Fix local planning view stretching

    • In _LocalPlanningView, remove forced aspectRatio: 1.0.
    • Use grid-based ratio (gridInfo.width / gridInfo.height) when available.
    • Fallback to 1.0 only when grid data is unavailable.
    • Result: local map + overlays no longer look distorted.
  3. Web viewport layout strategy (portrait vs landscape)

    • Portrait (aspect < 1): keep default stretch/fill behavior.
    • Landscape (aspect >= 1): lock app content to 1:1, top-aligned.
    • Improves visual stability on wider screens.
  4. Dark-tech UI style refresh

    • Applied dark theme tuning in main.dart and home/device/operate related pages.
    • Improved card hierarchy, typography contrast, and panel readability.
    • Updated Device tab readability (especially Sensor mode and System metric rows).
  5. Home page color unification

    • Reworked mixed gray/blue/green accents for Device/Map/Operate cards and Quick Status.
    • Use a more unified accent style to avoid visual mismatch.

Validation

  • Ran flutter analyze on modified frontend files (no blocking errors).
  • Ran flutter build web successfully after updates.

Note: existing non-blocking warnings (e.g. deprecations like withOpacity) are pre-existing/style-level and not runtime blockers.

image image image image image image

Offline web resource support

This PR also removes runtime internet dependencies for the Flutter web app:

  • Serves Flutter CanvasKit from the local web build instead of www.gstatic.com
  • Serves fallback fonts locally instead of fonts.gstatic.com
  • Replaces invalid local Roboto font files with real bundled font assets
  • Documents building web with --no-web-resources-cdn

This makes the app safer to use in offline robot deployment environments.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (252.9 files/s, 37191.0 lines/s)
Language files blank comment code
Python 13 613 262 3399
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 933 359 4884

@xiaolefang-dm xiaolefang-dm requested a review from dvorak0 May 1, 2026 09:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (315.8 files/s, 46444.8 lines/s)
Language files blank comment code
Python 13 613 262 3399
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 933 359 4884

@xiaolefang-dm xiaolefang-dm changed the title fix: use BoxFit.cover for camera preview to fill panel feat(frontend): dark-tech UI polish + map/local-view aspect improvements May 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.20 s (211.6 files/s, 31701.4 lines/s)
Language files blank comment code
Python 13 624 273 3493
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 944 370 4978

@xiaolefang-dm xiaolefang-dm force-pushed the xiaole/fix/camera-cover-fit branch from 67afb0a to eaf0198 Compare May 4, 2026 14:27
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.18 s (238.4 files/s, 35051.7 lines/s)
Language files blank comment code
Python 13 613 262 3399
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 933 359 4884

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.18 s (230.3 files/s, 34019.9 lines/s)
Language files blank comment code
Python 13 615 262 3414
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 31 30 200
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 936 360 4909

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (243.4 files/s, 35963.5 lines/s)
Language files blank comment code
Python 13 615 262 3414
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 31 30 200
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 936 360 4909

xiaolefang-dm and others added 4 commits May 10, 2026 14:31
- Change camera preview from BoxFit.contain (letterboxed) to BoxFit.cover (fills panel)
- Fullscreen preview still uses BoxFit.contain to show full image
@xiaolefang-dm xiaolefang-dm force-pushed the xiaole/fix/camera-cover-fit branch from 485c5f4 to 497f676 Compare May 10, 2026 06:36
@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.18 s (238.6 files/s, 35570.8 lines/s)
Language files blank comment code
Python 13 620 262 3464
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 41 9 272
Dockerfile 1 31 30 202
JSON 2 8 0 58
TOML 1 4 0 58
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 42 941 360 4961

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