Skip to content

Conversation

@ryanw-mobile
Copy link
Owner

All widgets on the Agile Screen and Usage Screen now share the same base Card Layout, which specifies a uniform max width.

When the window is extremely wide, we do not fully use the available width, and cap the widget width to WindowWidthSize.Compact. Since widgets are a part of the fixed layout, we simply hardcode the adaptive layout for now.

Some minor overall layout was updated.

Agile rate trend is now animated.

* main:
  [feature] GenerateUsageInsightsUseCase: implement rounding and add unit tests
  [test] ConsumptionGroupedCells: add unit tests
  [feature] InsightsCard: update to show the cost is reference cost (fake) or estimated cost (real)
  [feature] Insights: add isTrueCost attribute
  [refactor] UsageViewModel: split function into GenerateUsageInsightsUseCase
  [refactor] UserProfile: make all class properties non-null to simplify processing; add helper functions; allow demo mode to lookup rates
  [feature] Usage: minor UI string update
  [chore] Renovate: Update dependency io.github.koalaplot:koalaplot-core 0.6.0 to v0.6.1
  [feature] UsageViewModel: bare minimum working code to calculate realistic half-hourly usage cost by 1:1 rate mapping; other presentation styles stays the old rough calculation
  [refactor] RateGroup: update getRateTrend to honour validTo == Instant.DISTANT_FUTURE
  [test] Unit test: replace validTo == null with Instant.DISTANT_FUTURE
  [refactor] Rate: change validTo to use Instant.DISTANT_FUTURE when API returns null
  [refactor] RestApiRepository: simplify getAccount() by returning Account? rather than List<Account>
  [test] AccountSamples: update agreements for use in demo mode
  [refactor] GetConsimptionAndcostUseCase: update error messages
  [refactor] ConsumptionDataGroup: rename to ConsumptionTimeFrame as suggested by ChatGPT
  [test] GetConsumptionAndCostUseCaseTest: update unit tests
  [feature] Consumptions: Add ConsumtionWithCost domain model; Update UseCase and Viewmodel to take this model; no real cost is calculated uet
  [refactor] Consumption: rename extension functions
* main: (99 commits)
  [test] OctopusRestApiRespository: add unit tests
  [feature] RestApiRepository: getStandingCharges() now exposes paymentMethod but default to Unknown
  [feature] OctopusRestApiRepository: add database caching to rates and standing charges
  [test] RateEntityKtTest: fix class name
  [feature] RateMapper: implement RateEntity mappers
  [feature] RateEntity: add coversRange() for repository use
  [refactor] Rate: remove vatExclusivePrice in domain model
  [chore] Renovate: Update dependency org.jetbrains.kotlinx.kover 0.8.1 to v0.8.2
  [test] RoomDatabaseDataSource: add unit tests
  [test] RateDao: add unit tests and fix implementation
  [refactor] RoomDB: update Dao and DataSource to take paymentMethod as paymentMethod type
  [feature] RoomDB: change RateEntity.paymentMethod from String to PaymentMethod with converters
  [feature] RoomDB: finalise database for common rates storage
  [chore] Renovate: Update dependency androidx.test:core-ktx 1.6.0 to v1.6.1
  [chore] Renovate: Update dependency androidx.test.ext:junit 1.2.0 to v1.2.1
  [chore] Renovate: Update dependency androidx.test.espresso:espresso-core 3.6.0 to v3.6.1
  [feature] StandingChargeDao: implement dao
  [feature] RoomDB: define StandardUnitRateEntity and StandingChargeEntity
  [test] Sample data: group all sample data under test.samples
  [chore] Renovate: Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json 1.7.0 to v1.7.1
  ...
…rce and apply animation to the trend indicator
@ryanw-mobile ryanw-mobile added the feature A new feature for the user, not a new feature for a build script. label Jun 29, 2024
@ryanw-mobile ryanw-mobile added this to the v1.3.0 milestone Jun 29, 2024
@ryanw-mobile ryanw-mobile requested a review from rwmobi June 29, 2024 03:55
@ryanw-mobile ryanw-mobile self-assigned this Jun 29, 2024
@ryanw-mobile ryanw-mobile linked an issue Jun 29, 2024 that may be closed by this pull request
@ryanw-mobile ryanw-mobile enabled auto-merge June 29, 2024 03:55
@codacy-production
Copy link
Contributor

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.03% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (8338194) 2085 1388 66.57%
Head commit (990157e) 2086 (+1) 1388 (+0) 66.54% (-0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#239) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences


🚀 Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@ryanw-mobile ryanw-mobile merged commit 03d6bfd into main Jun 29, 2024
@ryanw-mobile ryanw-mobile deleted the feature/212-redesign-widget-space branch June 29, 2024 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature for the user, not a new feature for a build script.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agile and Usage screen: Redesign widget space

3 participants