[WEB-4787] fix: changed issue to work item in cycles dropdown#7706
[WEB-4787] fix: changed issue to work item in cycles dropdown#7706
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughUpdated EstimateTypeDropdown's collapsed view to show the human-readable option label for the selected value by looking up Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items
Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the cycles dropdown to display "work item" instead of "issue" in the estimate type dropdown. The change ensures that the user-facing label is properly displayed instead of the raw value.
- Updated the default display to show proper labels from the cycle estimate options
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
27-29: DRY the selected label lookupCompute once and reuse to keep logic consistent across both render paths.
Example:
const selectedLabel = React.useMemo( () => cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None", [value] ); // ... <CustomSelect value={value} label={<span>{selectedLabel}</span>} onChange={onChange} // ... /> // ... showDefault ? <span>{selectedLabel}</span> : nullAlso applies to: 41-41
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx (1)
cycleEstimateOptions(33-36)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build and lint web apps
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
41-41: No remaining user-facing “issue(s)” labels in cycles UI. All literal UI strings now use “Work item(s)”; any remaining matches are imports, variable names, comments, or translation keys.
| </div> | ||
| ) : showDefault ? ( | ||
| <span className="capitalize">{value}</span> | ||
| <span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span> |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Fix casing + add fallback to avoid blank UI
The "capitalize" class turns "Work items" into "Work Items", diverging from product copy and the dropdown label. Also add a "None" fallback for parity with the select label.
- <span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span>
+ <span>{cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None"}</span>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <span className="capitalize">{cycleEstimateOptions.find((v) => v.value === value)?.label}</span> | |
| <span>{cycleEstimateOptions.find((v) => v.value === value)?.label ?? "None"}</span> |
🤖 Prompt for AI Agents
In apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx around
line 41, the span currently forces CSS "capitalize" and can render blank when no
matching option exists; remove the "capitalize" class so the label is used
verbatim (preserving product copy) and add a fallback that displays "None" when
cycleEstimateOptions.find(...) returns undefined or value is falsy so the UI
never shows a blank label.
…wn.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
Changed issue to work item in cycle dropdown
Screenshots and Media (if applicable)
Before


After
Summary by CodeRabbit