Skip to content

Conversation

@joe-replin
Copy link
Contributor

@joe-replin joe-replin commented Jan 22, 2026

Fix

  • Fixes Completion calculations can return NaN when page content is optional #259
  • Prevent division-by-zero that produced NaN for page-level progress when a page contains only optional content.
  • Page-level progress now consistently returns 0 for fully-optional pages/components instead of NaN, preventing invalid CSS such as --adapt-pagelevelprogress-percentage: NaN%; which previously made the indicator render incorrectly.

Testing

  1. Set "_isOptional": true on page content (manually or via diagnostic extension)
  2. Navigate to menu and verify:
  3. Progress indicator shows "Optional" label below the progress bar
  4. Empty progress bar displays correctly (0% instead of appearing full due to NaN)
  5. Navigate within the optional page and check the navigation bar progress indicator
  6. Test with screen reader - verify it announces "Optional" before progress information
  7. Test non-optional content - verify no extra wrapper elements or labels appear
  8. Inspect DOM - confirm pagelevelprogress__indicator-group only exists when content is optional

@joe-replin
Copy link
Contributor Author

Thanks, @swashbuck.

Copy link
Contributor

@swashbuck swashbuck left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

👀

@oliverfoster oliverfoster merged commit 741f5a1 into master Jan 26, 2026
1 check passed
@oliverfoster oliverfoster deleted the issue/259 branch January 26, 2026 08:50
@github-project-automation github-project-automation bot moved this from New to Recently Released in adapt_framework: The TODO Board Jan 26, 2026
github-actions bot pushed a commit that referenced this pull request Jan 26, 2026
## [8.3.3](v8.3.2...v8.3.3) (2026-01-26)

### Chore

* Bump js-yaml from 4.1.0 to 4.1.1 (#264) ([a1b97cb](a1b97cb)), closes [#264](#264)
* Bump lodash from 4.17.21 to 4.17.23 (#262) ([2a17ab0](2a17ab0)), closes [#262](#262)
* Bump lodash-es from 4.17.21 to 4.17.23 (#261) ([f797ff4](f797ff4)), closes [#261](#261)

### Fix

* Prevent division by zero in progress calculations (#265) ([741f5a1](741f5a1)), closes [#265](#265)
@github-actions
Copy link

🎉 This PR is included in version 8.3.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Recently Released

Development

Successfully merging this pull request may close these issues.

Completion calculations can return NaN when page content is optional

5 participants