Skip to content

Implement the new card in the Profile screen for the subscription - #805

Merged
PavlosTze merged 2 commits into
feature/hyperlocal-upsellfrom
feature/fe-2046-profile-tab
Nov 10, 2025
Merged

PavlosTze merged 2 commits into
feature/hyperlocal-upsellfrom
feature/fe-2046-profile-tab

Conversation

@PavlosTze

Copy link
Copy Markdown
Collaborator

Why?

Implement the new card in the Profile screen for the subscription

How?

  • Added a new card in the profile's layout
  • Created in UIWalletRewards two helper functions to get the calculations regarding the free trial (if available) and the remaining tokens to reach the free trial
  • Depending on those two above, set the correct UI in the ProfileFragment after we receive the data for the tokens.

Testing

Play around with the if/else and make sure everything renders correctly.

Additional context

As discussed, the part of the billing library is not part of this PR, so a simple if (false) is included.

@PavlosTze
PavlosTze requested a review from pantelisss November 5, 2025 11:02
@PavlosTze
PavlosTze changed the base branch from main to feature/hyperlocal-upsell November 5, 2025 11:02
@github-actions

github-actions Bot commented Nov 5, 2025 •

Copy link
Copy Markdown

Coverage Report (Type: Instructions)

Overall Project 85.85% -0.21% ✅
Files changed 0% ✅

File Coverage
UIModels.kt 52.01% -2.26% ✅

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not
@PavlosTze
PavlosTze merged commit 7f088c9 into feature/hyperlocal-upsell Nov 10, 2025
1 of 2 checks passed
@PavlosTze
PavlosTze deleted the feature/fe-2046-profile-tab branch November 10, 2025 16:16
PavlosTze added a commit that referenced this pull request Nov 19, 2025
* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not
PavlosTze added a commit that referenced this pull request Nov 24, 2025
* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not
PavlosTze added a commit that referenced this pull request Nov 27, 2025
* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not
PavlosTze added a commit that referenced this pull request Nov 27, 2025
* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not
PavlosTze added a commit that referenced this pull request Dec 1, 2025
* Implement the new card in the Profile screen for the subscription (#805)

* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

* Create the initial manage subscription screen

* Manage subscription + plans screen

* Launch billing flow, handle purchases

* Update UI of the purchase update state + support of remote configurable banner

* Finalize the UI

* Fixes

* Fix detekt + unit tests

* Fixes on when clearing the shared flow

* Add some view content events

* UI fixes + add "powered by Meteoblue banner"

* Update gradle version

* Fix the actions

* Fixed the check of free premium trial available

* Fixes on logged out state in forecast tab

* Handle login state in Manage Subscription screen

* Handle tabs coloring in device details

* Fix text on success button in the billing flow

* Fixes
eeVoskos added a commit that referenced this pull request Feb 27, 2026
* Implement the new card in the Profile screen for the subscription (#805)

* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

* Feature/fe 2044 plans (#823)

* Implement the new card in the Profile screen for the subscription (#805)

* Implement the new card in the Profile screen for the subscription

* Forecast in tab in station details + in forecast details (#807)

* WIP of forecast tab's state & prompt. Billing library missing to check state.

* Integrate the billing library, create functionality for initializing it and fetching if we have an active sub or not and update the UI respectively

* Handle UI in Forecast Details if premium is available or not

* Create the initial manage subscription screen

* Manage subscription + plans screen

* Launch billing flow, handle purchases

* Update UI of the purchase update state + support of remote configurable banner

* Finalize the UI

* Fixes

* Fix detekt + unit tests

* Fixes on when clearing the shared flow

* Add some view content events

* UI fixes + add "powered by Meteoblue banner"

* Update gradle version

* Fix the actions

* Fixed the check of free premium trial available

* Fixes on logged out state in forecast tab

* Handle login state in Manage Subscription screen

* Handle tabs coloring in device details

* Fix text on success button in the billing flow

* Fixes

* Fixed the placement of meteoblue logo

* Show powered by weatherxm logo instead of the text we had before

* WIP - Integrate the purchaseToken in the API request

* Finalize the integration of the purchaseToken in the API and the isPremium in the response

* Fix the discrepancies between the premium data and the default ones

* Bump version

* Fix the STOPSHIP comment

* Minor detekt fixes

* More fixes

* Reverse the position of powered by and hyperlocal

* Replace the RangeSlider with a custom compose component to better draw the corner radius and make it customizable

* Chages in the Hyperlocal Prompt card and in the Powered by card

* Support of two different endpoints in Forecast (no UI yet)

* Add the two tabs in the forecast tab of the device details

* Fix powered by visibility in forecast fragment

* Fixes on forecast tab. Add the two tabs in forecast details.

* Fix in forecast details

* Fixes in forecast tab in hourlies to set probability to visible when setting it

* WIP: Add premium gradient color in temperature bar in forecast tab

* WIP paint the weather icons in the daily forecast in the forecast tab with gradient when premium

* Add gradient in the charts in forecast details in premium tab

* Fix the forecast tab color at onResume

* Replace the DailyTileForecastAdapter with a composable one, in order to better adjust the border when in hyperlocal tab

* Change the prompt CTA text

* Update the texts in the profile tab

* Redesign the top bar, the bottom bar and add the selector at the top of the screen

* Redesign the subscription management screen

* Fix detekt

* Fixes

* Implement the UI changes when downgrading and the new dialog before downgrading.

* Bump version to release in closed testing

* Fixed the downgrade dialog by using a custom composable

* Fix test code

* Hide the tab selectors and keep only the monthly subscription

* Add precipitation in pro forecast

* Fetch forecast again if the user went to the manage subscription screen (to catch new purchases automatically)

* Hide premium implementation for Solana users

* Bump version

* Redesign FreePlanView and PremiumPlanView for hyperlocal upsell

- PremiumPlanView: remove icon box, add gradient overlay, pill badges
  (★ Best Accuracy / Current Plan), trial-aware pricing section (2 Months
  Free + then-note vs regular price + baseline-aligned period), green tick
  feature items, divider, description
- FreePlanView: remove icon box, muted pill badge, smaller $0 price,
  tagline, divider, dot-box feature items
- Premium always shown first in the list
- Action button colour updated to colorPrimary to match card accents
- More breathing room between cards and action button
- 7 new strings added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix UI contrast issues in manage subscription screen

* Minor fixes

* Fix unit tests

* Bump version

* Drive PremiumPlanView UI decisions from offer tags

- Extend SubscriptionOffer with tags, freeTrialPeriod, discountedCycles, basePrice
- Rewrite setupProducts() to emit one offer per store entry with phase metadata
- Replace hardcoded offer ID resolution in getMonthlyAvailableSub() with tag-based logic
- Gate free trial box, launch offer title, and discount row on their respective tags
- Use dynamic free trial month count parsed from freeTrialPeriod (e.g. "P2M" → 2)
- Select "for the next N months" vs "for the first N months" based on free-trial tag
- Split preview into four separate named functions for per-state visibility in AS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update dependencies and free trial threshold

* Bump version code

* Update free trial threshold strings

The threshold for unclaimed $WXM required to unlock and claim a Premium free trial has been updated from 100 to 200 in the user-facing strings.

* feat: Update app version code

* Update app/src/main/java/com/weatherxm/service/BillingService.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update app/src/main/java/com/weatherxm/service/BillingService.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update app/src/test/java/com/weatherxm/ui/forecastdetails/ForecastDetailsViewModelTest.kt

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Minor fixes

* Changed default build variant

* Add inspection suppression for signing configuration in build script

* Add unstable API usage suppression for locale filters

* Fix detekt violations across billing, subscription UI, and test files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update tag sorting logic in build script

* Update test data for wallet rewards in DeviceDetailsViewModelTest

---------

Co-authored-by: Pavlos Tzegiannakis <pavlostzeg@gmail.com>
Co-authored-by: Pavlos Tzegiannakis <pavlostze@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

This branch had an error being deployed

1 failed deployment
production — 30ae0be1 Deployed Nov 10, 2025 by PavlosTze via unit-tests #1187
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.

2 participants