Repository navigation
[WEB-9926] feat: add Rating and Slider work item property types - #71
Conversation
- RATING and SLIDER in PropertyType (v1) and WorkItemPropertyType (v2). - The v1 create types for both refuse settings, a default value and is_multi, as Plane does. - SliderSettings types the bounds Plane returns for a Slider. - Customer property types stay without them: Plane refuses both on a customer property.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Linked to Plane Work Item(s) References This comment was auto-generated by Plane |
Description
Plane has Rating (a whole number from 1 to 5) and Slider (a whole number from 0 to 10) work item property types, but the SDK's property type lists didn't include them, so callers had to cast
"RATING"and"SLIDER"as plain strings.PropertyType(v1) andWorkItemPropertyType(v2) includeRATINGandSLIDER.CreateWorkItemPropertytakes both, and refusessettings,default_valueandis_multi: truefor them at compile time, as Plane does with a 400.SliderSettings({ min, max }) types the bounds Plane returns on a Slider. It's part ofWorkItemPropertySettings.CreateRatingWorkItemProperty,CreateSliderWorkItemProperty,SliderSettings) and the four widened types.Types only, with no runtime change. Creating either type needs a Plane server that has it.
Type of Change
Screenshots and Media (if applicable)
Not applicable: types only.
Test Scenarios
tests/unit/property-types.test.ts. Each@ts-expect-errorfails the suite if the line it guards stops being an error:RATINGandSLIDER, and a Slider property reads its{ min, max }settingssettingsor adefault_value, or a Rating withsettingsoris_multi: true, is a type errorRATINGandSLIDERpnpm build(export snapshot matches, bundle type-checks),pnpm check:types,pnpm check:lint(0 errors, no new warnings),pnpm check:format,pnpm test:unit(1071 passed).References
"SLIDER"and"RATING"string comparisons after bumping the SDK.Summary by CodeRabbit