Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix color scheme for empty cards report dialog #17985

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

lukstbit
Copy link
Member

@lukstbit lukstbit commented Feb 15, 2025

Purpose / Description

Replaced the previous implementation using an WebView with a TextView using HtmlCompat and text spans for the click behavior. Also added a test to prevent unexpected backend changes to the html report structure that we expect.

How it looks with the fix

Screenshot from 2025-02-15 12-24-46
Screenshot from 2025-02-15 12-24-24
Screenshot from 2025-02-15 12-24-05
Screenshot from 2025-02-15 12-23-46
Screenshot from 2025-02-15 12-22-57
Screenshot from 2025-02-15 12-22-37
Screenshot from 2025-02-15 12-22-16
Screenshot from 2025-02-15 12-21-12

Fixes

How Has This Been Tested?

Ran the tests, checked all themes, checked the expected behavior.

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

LGTM, optional nitpicks

@david-allison david-allison added Needs Author Reply Waiting for a reply from the original author Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Feb 15, 2025
@lukstbit lukstbit force-pushed the fix_emptyCardsDarkThemeReport branch from 5b49b5f to 41cdcad Compare February 16, 2025 19:46
@lukstbit lukstbit removed the Needs Author Reply Waiting for a reply from the original author label Feb 16, 2025
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Approval still stands

This removes the initial implementation using an WebView in favor of a
TextView and parsing the report with HtmlCompat. The nids links are
now implemented through ClickSpans.

Also adds a test to check the html backend report structure to make
sure the report parsing code present in EmptyCardsFragment stays
relevant.
@lukstbit lukstbit force-pushed the fix_emptyCardsDarkThemeReport branch from 41cdcad to 37f45a2 Compare February 17, 2025 06:13
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

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

Really good. I tried using ClickableSpan in the last PR, but didn't manage in the first try. Great job!

@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Feb 17, 2025
@BrayanDSO BrayanDSO added this pull request to the merge queue Feb 17, 2025
Merged via the queue into ankidroid:main with commit da54fda Feb 17, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Feb 17, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Feb 17, 2025
@lukstbit lukstbit deleted the fix_emptyCardsDarkThemeReport branch February 17, 2025 15:16
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.

Empty cards dialog has white background in Black theme
3 participants