Skip to content

feat: WidgetSmall redesign with material you dynamic color#17654

Merged
mikehardy merged 9 commits intoankidroid:mainfrom
Rdkang:widget_modern
Jan 27, 2025
Merged

feat: WidgetSmall redesign with material you dynamic color#17654
mikehardy merged 9 commits intoankidroid:mainfrom
Rdkang:widget_modern

Conversation

@Rdkang
Copy link
Contributor

@Rdkang Rdkang commented Dec 24, 2024

Purpose / Description

The current small widget doesn't fit the style of the application or current versions of android material you theme

Fixes

Approach

Redesigned the widget and uses material you colors to fit

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration (SDK version(s), emulator or physical, etc)

Virtual pixel 3 on SDK 28 and pixel 7 on SDK 35

Learning (optional, can help others)

Describe the research stage

Links to blog posts, patterns, libraries or addons used to solve this problem

Checklist

Please, go through these checks before submitting the PR.

  • 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

Screenshots

  1. Widget
  1. Widget when there are no cards to review it will be darker
  1. Widget with monochrome material you theme chosen and themed icons
  1. Widget with orange material you theme chosen and themed icons
  1. Widget with green material you theme chosen and themed icons

Improvements

  1. Better icon for the estimated time
  2. Make the circle background for the numbers evenly padded around the text

Any feedback on the designs of the notification bubbles would be greatly appreciated :)

@welcome
Copy link

welcome bot commented Dec 24, 2024

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

Interesting - looks like most of the work is in the icon specification?
Is there some way to preserve the visible difference between dev build and prod build like we have now with the red icon color vs the blue icon color?

Obviously the point of the change is to have the colors match theming - perhaps there is a way to badge the icon by layering a dev "sash" over it, similar to the badging plugin used by fastlane (underlying implementation here: https://github.com/HazAT/badge - perhaps it could be run during debug builds as a gradle step? Perhaps the generated badge could be in the debug src/res tree ? I'm not sure what is best)

@lukstbit lukstbit added the Needs Author Reply Waiting for a reply from the original author label Dec 24, 2024
@david-allison
Copy link
Member

@mikehardy just to note: the red isn't a beta feature, it's an indicator of "you have pending reviews".

@mikehardy
Copy link
Member

@mikehardy just to note: the red isn't a beta feature, it's an indicator of "you have pending reviews".

Ah interesting - that means that for the widgets at least there is currently no way to differentiate between "widgets built for the .debug build and connected to your .debug install (or perhaps parallel install!) vs the main / production ones?

That whole sentence reads like an assertion but the question mark is key - I'm not sure

@david-allison
Copy link
Member

david-allison commented Dec 24, 2024

I don't believe there is a difference for the widgets between beta and stable.

I am concerned that we lose the distinction between 'done' and 'not done' with this PR. Some users love it:

Screenshot 2024-12-24 at 14 50 45

https://www.reddit.com/r/Anki/comments/1h81z48/comment/m0rcsuq/?context=1

@Rdkang
Copy link
Contributor Author

Rdkang commented Jan 6, 2025

I don't believe there is a difference for the widgets between beta and stable.

I am concerned that we lose the distinction between 'done' and 'not done' with this PR. Some users love it:
Screenshot 2024-12-24 at 14 50 45

https://www.reddit.com/r/Anki/comments/1h81z48/comment/m0rcsuq/?context=1

Screenshots

1. Widget
2. Widget when there are no cards to review it will be darker

The distinction is still implemented, as you can see in screenshot in 1 and 2. when there are no reviews the widget will have a darker version of the dynamic color.
I can make it a different style if you want @david-allison :)

@david-allison

This comment was marked as off-topic.

@david-allison
Copy link
Member

@Rdkang We (I) want a color which is pleasant to look at when the user has finished the reviews. Going from a [really nicely done] blue to a grey doesn't fill me with joy.

You have better design taste than me, whatever you feel works given the above guidance!

@Rdkang
Copy link
Contributor Author

Rdkang commented Jan 17, 2025

@Rdkang We (I) want a color which is pleasant to look at when the user has finished the reviews. Going from a [really nicely done] blue to a grey doesn't fill me with joy.

You have better design taste than me, whatever you feel works given the above guidance!

I agree with the color not bringing joy :)
So how about the star being a slightly darker shade when in finished state.

  • Widget with green material you theme chosen and themed icons
  1. finished state with darker star
  1. finished state with darker star and darker border

Which one do you prefer @david-allison?

@david-allison
Copy link
Member

Truthfully, I can't see a huge difference between option 1 and 2, slightly prefer option 1.

I would consider making the 'pending cards' state /slightly/ less 'fun'

But... tell me when YOU feel you're happy and ready for review 😄

Signed-off-by: Rdkang <68774237+Rdkang@users.noreply.github.com>
@Rdkang
Copy link
Contributor Author

Rdkang commented Jan 17, 2025

Truthfully, I can't see a huge difference between option 1 and 2, slightly prefer option 1.

I would consider making the 'pending cards' state /slightly/ less 'fun'

But... tell me when YOU feel you're happy and ready for review 😄

I've made the pending card state a more colorful and fun look to draw your attention to the outstanding reviews. This helps you quickly see when reviews pending.
Once the reviews are finished, the widget is intended to fade into the background, allowing you to focus on other tasks

This is my thought process 😄, Let me know if this approach aligns with what you had in mind.
Otherwise i think this pull request is ready for review :)

@david-allison david-allison added Needs Review and removed Needs Author Reply Waiting for a reply from the original author labels Jan 18, 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.

Screenshots (S21)

I have tested this on API 24 and it still works.

Looks great to me, thanks so much!!


One last-minute question, besides that it's a strong approve. Code quality is great

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.

Gong through a period of very low activity, sorry this sat!

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 27, 2025
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

Visually, looks great - thank you!

@mikehardy mikehardy merged commit 85f9648 into ankidroid:main Jan 27, 2025
9 checks passed
@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Jan 27, 2025
@github-actions github-actions bot added this to the 2.21 release milestone Jan 27, 2025
@david-allison
Copy link
Member

Note

Invoice already submitted, no action needed, posting this for documentation purposes

Hi there @Rdkang! This is the OpenCollective Notice for PRs merged from 2025-01-01 through 2025-01-31

Starting 2025, we have updated our selection process for Open Collective, and you are eligible for compensation for your work, the process with details is here:

https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid

This note applies to all PRs merged for this month.

Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Themed Widgets

4 participants