Updated wait time logic to allow "0" from FF#848
Updated wait time logic to allow "0" from FF#848severinbeauvais wants to merge 1 commit intobcgov:mainfrom
Conversation
- updated wait time logic to allow "0" from the FF - updated default FFs accordingly
There was a problem hiding this comment.
Pull Request Overview
This PR changes the default values for hardcoded wait time feature flags from 0 to -1 and updates the condition logic to check for >= 0 instead of > 0. This allows 0 to be a valid hardcoded value while using -1 to indicate "use actual wait time from API."
- Changed default feature flag values from
0to-1for wait times - Updated condition checks from
> 0to>= 0to support0as a valid hardcoded value - Enhanced documentation with JSDoc comments explaining the return logic
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/src/plugins/launchDarkly.ts | Updated default values for hardcoded wait time feature flags from 0 to -1 |
| app/src/components/new-request/stats.vue | Updated condition logic to >= 0 and improved documentation for wait time getters |
| app/package.json | Version bump to 5.8.1 |
Comments suppressed due to low confidence (1)
app/src/components/new-request/stats.vue:115
- The condition in the
created()lifecycle hook still checks for=== 0, which is inconsistent with the new default value of-1. This should be updated to check for< 0or=== -1to determine when to fetch stats from the API. With the current code, stats will never be fetched when using the new defaults.
GetFeatureFlag('hardcoded_regular_wait_time') === 0 ||
GetFeatureFlag('hardcoded_priority_wait_time') === 0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I changed this to Do No Merge as we don't have a requirement here... What should be displayed when we "disable" the wait times? Zero? Dash? |
|
As I said above, there are no requirements at this time. Should we support "0" using the FF? Should it display "0" or "-"? Or should "-1" display a dash on-screen? Closing this PR for now. |
Issue #: None
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).