Skip to content

Improve dark mode for profiles screen - #137

Open
Sickjuicy wants to merge 29 commits into
netbirdio:mainfrom
Sickjuicy:main
Open

Improve dark mode for profiles screen#137
Sickjuicy wants to merge 29 commits into
netbirdio:mainfrom
Sickjuicy:main

Conversation

@Sickjuicy

@Sickjuicy Sickjuicy commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

This PR improves the color contrast and accessibility of the profile cards in dark mode.
A ThemeOverlay.MaterialComponents.Dark theme overlay is now applied to the cards, which ensures all buttons render with proper contrast and makes the UI more accessible and user-friendly.
grafik

grafik

Summary by CodeRabbit

  • Style
    • Refined the profile card layout with clearer alignment, spacing, button styling, and improved profile name readability.
  • New Features
    • Added light and dark theme support for profile cards, including coordinated background colors.
  • Refactor
    • Consolidated profile name typography into a reusable style for consistent size, weight, and color across the interface.

Sickjuicy and others added 24 commits July 8, 2025 21:46
# Conflicts:
#	app/src/main/res/values-night/colors.xml
Improves the color contrast and accessibility of the profile cards in dark mode by applying a theme overlay. This ensures all buttons render correctly with proper contrast.
Copilot AI review requested due to automatic review settings February 7, 2026 14:23
@coderabbitai

coderabbitai Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e9d3806d-290d-4a37-b01a-89964a709b31

📥 Commits

Reviewing files that changed from the base of the PR and between 2c8294d and dd9b55d.

📒 Files selected for processing (1)
  • app/src/main/res/values-night/colors.xml
💤 Files with no reviewable changes (1)
  • app/src/main/res/values-night/colors.xml

📝 Walkthrough

Walkthrough

Updated the profile list item with themed card styling, reusable text appearance, standardized button styles, revised constraints, and light/dark profile color resources.

Changes

Profile styling

Layer / File(s) Summary
Profile layout styling
app/src/main/res/layout/list_item_profile.xml
Applied Theme.NetBird.Card and profile_card_background to the card. Added reusable profile name text appearance. Updated constraints and button styles.
Theme resources
app/src/main/res/values/colors.xml, app/src/main/res/values/themes.xml, app/src/main/res/values-night/colors.xml, app/src/main/res/values-night/themes.xml
Added profile colors, light and dark card themes, and TextAppearance.NetBird.ProfileName.

Estimated code review effort: 2 (Simple) | ~12 minutes

Poem

🐇 I checked the card in day and night,
Profile names now wear bold text right,
Buttons follow their themed design,
Constraints keep each view in line,
Hop, hop—XML looks fine! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: improving dark-mode appearance and contrast on the profiles screen.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve dark-mode contrast/accessibility on the Profiles screen by introducing dedicated profile card/background colors and applying a MaterialComponents dark theme overlay to the profile card so Material buttons render with appropriate contrast.

Changes:

  • Add new profile_background and profile_card_background color resources for day/night.
  • Introduce Theme.NetBird.Card (night variant) based on ThemeOverlay.MaterialComponents.Dark.
  • Update list_item_profile.xml to apply the card theme overlay, set the card background color, and use Material button styles.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
app/src/main/res/values/colors.xml Adds default (day) colors for profile background and card background.
app/src/main/res/values-night/colors.xml Adds night colors for profile background and card background.
app/src/main/res/values-night/themes.xml Adds Theme.NetBird.Card style in the night configuration.
app/src/main/res/layout/list_item_profile.xml Applies the new card theme + background color and updates button styling/ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/res/layout/list_item_profile.xml
Comment thread app/src/main/res/layout/list_item_profile.xml
Comment thread app/src/main/res/layout/list_item_profile.xml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app/src/main/res/values-night/themes.xml`:
- Around line 60-61: Theme.NetBird.Card is only defined for night mode and is
referenced by list_item_profile.xml, causing crashes in light mode; add a
day-mode definition for Theme.NetBird.Card in the app's day themes resource
(values/themes.xml) mirroring the night variant but inheriting from
ThemeOverlay.MaterialComponents.Light so the style resolves during layout
inflation. Ensure the new entry uses the exact style name "Theme.NetBird.Card"
and parent "ThemeOverlay.MaterialComponents.Light" to match usage in
list_item_profile.xml and the existing night definition.
🧹 Nitpick comments (2)
app/src/main/res/values-night/colors.xml (1)

29-30: New profile colors duplicate existing values.

profile_background (#181A1D) is identical to nb_bg, and profile_card_background (#32363D) is identical to nb_gray_light. Consider referencing the existing colors (e.g., @color/nb_bg) to avoid drift, unless you intentionally want these to evolve independently.

app/src/main/res/layout/list_item_profile.xml (1)

36-44: Hardcoded textColor, textSize, and textStyle on the profile name.

These attributes are set directly on the view rather than via a TextAppearance style. This works but means any future typography changes must be applied in every layout file that uses similar headings. Consider extracting a reusable text appearance style if this pattern is used in multiple places.

Comment thread app/src/main/res/values-night/themes.xml
@pappz

pappz commented Mar 21, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the PR! Please consider the comments from RabbitAI.

@pappz

pappz commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the PR! Please consider the comments from RabbitAI.

@Sickjuicy The copilot found some issues. Do you plan to fix them?

@Sickjuicy

Copy link
Copy Markdown
Contributor Author

@pappz Yes, I’ve seen it. I just don’t have time right now, but I’ll take care of it.

Sickjuicy and others added 3 commits April 11, 2026 21:23
- Include values-night/colors.xml and list_item_profile.xml changes only as requested by user.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/src/main/res/values/themes.xml (1)

68-73: Apply the new TextAppearance.NetBird.ProfileName in the profile item layout to remove duplication.

The style is defined here, but app/src/main/res/layout/list_item_profile.xml (Line 28-39 in provided snippet) still hardcodes the same text attributes on text_profile_name.

Suggested follow-up diff (in app/src/main/res/layout/list_item_profile.xml)
 <TextView
     android:id="@+id/text_profile_name"
     android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:layout_marginStart="16dp"
     android:layout_marginEnd="8dp"
     android:ellipsize="end"
     android:maxLines="1"
-    android:textColor="@color/nb_txt"
-    android:textSize="18sp"
-    android:textStyle="bold"
+    style="@style/TextAppearance.NetBird.ProfileName"
     app:layout_constraintBottom_toBottomOf="@+id/icon_profile"
     app:layout_constraintEnd_toStartOf="@id/badge_active"
     app:layout_constraintHorizontal_bias="0"
     app:layout_constraintHorizontal_chainStyle="packed"
     app:layout_constraintStart_toEndOf="@id/icon_profile"
     app:layout_constraintTop_toTopOf="@+id/icon_profile"
     tools:text="default" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/res/values/themes.xml` around lines 68 - 73, Replace the
hardcoded text attributes on the TextView with id text_profile_name by removing
android:textColor, android:textSize and android:textStyle and instead apply the
new TextAppearance by adding
android:textAppearance="@style/TextAppearance.NetBird.ProfileName" to that
TextView (so it uses the defined TextAppearance.NetBird.ProfileName).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/src/main/res/values/themes.xml`:
- Around line 68-73: Replace the hardcoded text attributes on the TextView with
id text_profile_name by removing android:textColor, android:textSize and
android:textStyle and instead apply the new TextAppearance by adding
android:textAppearance="@style/TextAppearance.NetBird.ProfileName" to that
TextView (so it uses the defined TextAppearance.NetBird.ProfileName).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 422dbfb4-0c6f-4379-803a-e600a2aebfbb

📥 Commits

Reviewing files that changed from the base of the PR and between 00f3321 and c1c7a37.

📒 Files selected for processing (1)
  • app/src/main/res/values/themes.xml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/main/res/values/colors.xml Outdated
Comment thread app/src/main/res/values/colors.xml Outdated
Comment thread app/src/main/res/values-night/colors.xml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Sickjuicy
Sickjuicy requested a review from Copilot May 29, 2026 19:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.

3 participants