Skip to content

feat: shorten weekly period display labels#93

Draft
eirikhaugstulen wants to merge 4 commits into
mainfrom
fix/weekly-period-display-name
Draft

feat: shorten weekly period display labels#93
eirikhaugstulen wants to merge 4 commits into
mainfrom
fix/weekly-period-display-name

Conversation

@eirikhaugstulen

Copy link
Copy Markdown

Summary

Shortens weekly fixed-period name and displayName values to contain only the week title, e.g. Week 1, while preserving startDate and endDate as structured fields.

Why

Weekly labels currently include the date range, e.g. Week 1 - 2025-12-29 - 2026-01-04. Consumers that need a shorter UI label have to parse this localized display string, which is fragile. Since the period object already exposes startDate and endDate, callers can compose richer labels themselves.

This also makes weekly period display names more consistent with monthly periods, where the display name is the period title and dates remain separate structured fields.

Testing

  • CI=true yarn test --runInBand --watchAll=false --watchman=false src/period-calculation/generate-fixed-periods src/period-calculation/create-fixed-period-from-period-id src/period-calculation/get-adjacent-fixed-periods
  • yarn cucumber
  • yarn lint
  • yarn build:types
  • git diff --check

@codecov-commenter

codecov-commenter commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.84%. Comparing base (d202f08) to head (b9b79ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
- Coverage   90.87%   90.84%   -0.03%     
==========================================
  Files          57       57              
  Lines        1249     1245       -4     
  Branches      352      352              
==========================================
- Hits         1135     1131       -4     
  Misses        112      112              
  Partials        2        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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

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