8000 MBL-2490 Secret Rewards - limited:The secret reward is not available and the system shows it as available by jlplks · Pull Request #2343 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MBL-2490 Secret Rewards - limited:The secret reward is not available and the system shows it as available #2343

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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

jlplks
Copy link
Contributor
@jlplks jlplks commented Jun 9, 2025

📲 What

Ensure the reward selection CTA button is disabled for unavailable rewards, except for the “No Reward” option which is always enabled.

🤔 Why

Previously, some edge cases allowed users to interact with rewards that were marked as unavailable, which led to confusing UX and potential errors during pledge flow. Also, the “No Reward” option could be incorrectly disabled depending on availability status.

🛠 How

Updated the ctaButtonEnabled logic to:

  • Always enable the button for No Reward .
  • Ensure all other rewards are disabled when reward.isAvailable() returns false, regardless of other conditions.
  • Reordered the when branches to prioritize No Reward before availability checks.

👀 See

Screen_recording_20250609_132438.webm

📋 QA

Open a project in staging that has rewards in different availability states (including a “No Reward”).

Story 📖

MBL-2490

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.51%. Comparing base (283251d) to head (4590b41).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2343   +/-   ##
=========================================
  Coverage     66.51%   66.51%           
  Complexity     2271     2271           
=========================================
  Files           367      367           
  Lines         25785    25785           
  Branches       3861     3861           
=========================================
  Hits          17150    17150           
  Misses         6657     6657           
  Partials       1978     1978           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor
@Arkariang Arkariang left a comment

Choose a reason for hiding this comment

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

Potential improvement here for the future, we do need to extract the logic of that button to unit test it as much as possible(potentially to an utils if not wanting to test super deep the compose screen itself). It is quite challenging as it is now to make sure no regression is added when touching anything here 😮‍💨 .

Changes look good to me, manually tested it as well 👍

@jlplks
Copy link
Contributor Author
jlplks commented Jun 9, 2025

Potential improvement here for the future, we do need to extract the logic of that button to unit test it as much as possible(potentially to an utils if not wanting to test super deep the compose screen itself). It is quite challenging as it is now to make sure no regression is added when touching anything here 😮‍💨 .

Changes look good to me, manually tested it as well 👍

If i have time left on the sprint we could add that as a task to create test for this compose components and have it like a rule from now to create tests for each new component or change on the components

@jlplks jlplks merged commit 0fdad87 into master Jun 9, 2025
3 checks passed
@jlplks jlplks deleted the jpulido/MBL-2490 branch June 9, 2025 21:29
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
0