Skip to content

Conversation

@jlplks
Copy link
Contributor

@jlplks jlplks commented Jul 3, 2025

📲 What

Fix the choose another reward option on new manage pledge menu to be shown when FF is off

🤔 Why

On the refactor of the menu for manage pledge the choose another reward was deleted in order to use the Edit Pledge option, but when feature flag is off it should appear and when ff is on it should appear for non-plot projects

🛠 How

  • Added choose another reward option to xml menu
  • Add validations to show it or not matchin iOS behavior

👀 See

  • FEATURE FLAG OFF NO-PLOT PROJECT
ff_off_non_plot.webm
  • FEATURE FLAG OFF PLOT PROJECT
ff_off_plot.webm
  • FEATURE FLAG ON NO-PLOT PROJECT
ff_on_non_plot_project.webm
  • FEATURE FLAG ON PLOT PROJECT
ff_on_plot_project.webm

📋 QA

Check the render of the menu depending on the feature flag status. This is the matrix:

Feature Flag: OFF

Pledge Type Choose Another Reward Edit Pledge
Standard pledge (non-PLOT) ✅ YES ❌ NO
Standard pledge (PLOT) ✅ YES ❌ NO
Pledge Over Time ❌ NO ❌ NO

Feature Flag: ON

Pledge Type Choose Another Reward Edit Pledge
Standard pledge (non-PLOT) ✅ YES ❌ NO
Standard pledge (PLOT) ❌ NO ✅ YES (if project is live && not preauth)
Pledge Over Time ❌ NO ✅ YES (if project is live && not preauth)

Story 📖

MBL-2585

@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Project coverage is 67.26%. Comparing base (d0f9098) to head (32a476d).

Files with missing lines Patch % Lines
...arter/ui/helpers/ManagePledgeMenuOptionsFactory.kt 66.66% 1 Missing and 3 partials ⚠️

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

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2367   +/-   ##
=========================================
  Coverage     67.26%   67.26%           
- Complexity     2340     2341    +1     
=========================================
  Files           375      375           
  Lines         26647    26658   +11     
  Branches       4027     4030    +3     
=========================================
+ Hits          17924    17932    +8     
- Misses         6543     6544    +1     
- Partials       2180     2182    +2     

☔ 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.

android:title="@string/Edit_pledge"
app:showAsAction="never"/>
<item android:id="@+id/choose_another_reward"
android:title="@string/Choose_another_reward"
Copy link
Contributor

Choose a reason for hiding this comment

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

If wanted to avoid adding more items to the menu, you could simple change the title programatically, as at the end of the day as jovani mentions in his comments we do need to always present the menu option with only 1 exception when the ffOff for plot projects

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.

Approved as I've tested it and brings back the menu + there is tests around it 💟 , though we can definitely clean up here:
1 - remove PLOT feature flag (as been released for several months already).
2 - no need to have a different menu item, we can always change the title programatically if required different strings depending on plot/non-plot .

So I'll suggest write the clean up ticket and bring it to the sprint as soon as we get this release out!

@jlplks jlplks merged commit 916f916 into master Jul 3, 2025
3 checks passed
@jlplks jlplks deleted the jpulido/MBL-2585 branch July 3, 2025 20:09
leighdouglas pushed a commit that referenced this pull request Jul 3, 2025
…ay the edit option (#2367)

* Fix menu options for plot and non plot to show choose another reward opt

* delete unecesary log

* Update app/src/main/java/com/kickstarter/ui/helpers/ManagePledgeMenuOptionsFactory.kt

Co-authored-by: jovaniks <[email protected]>

* Update app/src/main/java/com/kickstarter/ui/helpers/ManagePledgeMenuOptionsFactory.kt

Co-authored-by: jovaniks <[email protected]>

* added tests

---------

Co-authored-by: jovaniks <[email protected]>
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.

5 participants