Skip to content

[WEB-9926] feat: add Rating and Slider work item property types - #71

Merged
Prashant-Surya merged 2 commits into
mainfrom
feat/web-9926-slider-rating-property-types
Nov 26, 2026
Merged

Prashant-Surya merged 2 commits into
mainfrom
feat/web-9926-slider-rating-property-types

Conversation

@b-saikrishnakanth

@b-saikrishnakanth b-saikrishnakanth commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

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) and WorkItemPropertyType (v2) include RATING and SLIDER.
  • CreateWorkItemProperty takes both, and refuses settings, default_value and is_multi: true for them at compile time, as Plane does with a 400.
  • SliderSettings ({ min, max }) types the bounds Plane returns on a Slider. It's part of WorkItemPropertySettings.
  • Customer property types are unchanged, because Plane refuses both types on a customer property.
  • The types bundle export snapshot is updated for the three new exports (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

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Not applicable: types only.

Test Scenarios

  • New compile-time tests in tests/unit/property-types.test.ts. Each @ts-expect-error fails the suite if the line it guards stops being an error:
    • v1 and v2 type lists accept RATING and SLIDER, and a Slider property reads its { min, max } settings
    • creating a Rating or a Slider property type-checks
    • creating a Slider with settings or a default_value, or a Rating with settings or is_multi: true, is a type error
    • a customer property refuses RATING and SLIDER
  • pnpm 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).
  • Not run: e2e suite (needs credentials).

References

  • Work items: WEB-9926 (Slider), WEB-9925 (Rating)
  • Server support: makeplane/plane-ee#10995 and makeplane/plane-ee#10994 (Slider), makeplane/plane-ee#10929 (Rating)
  • Used by makeplane/plane-ee#11063 (Slider) and makeplane/plane-ee#10985 (Rating). Once this is released, silo can drop its "SLIDER" and "RATING" string comparisons after bumping the SDK.

Summary by CodeRabbit

  • New Features
    • Work-item properties now support rating and slider types. Slider properties can specify minimum and maximum values.
    • Property creation supports rating and slider options, with validation for their supported settings.
    • Customer properties do not support rating or slider types.

- 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.
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6b76c55c-b7db-4b44-ae82-6903634da199
Commits

Reviewing files that changed from the base of the PR and between 9ee7f58 and abe9ed7.

Files selected for processing: 1

  • scripts/__fixtures__/types-bundle-exports.snapshot.txt

No actionable comments were generated in the recent review.

Walkthrough

The model types now support rating and slider work-item properties. Slider settings include numeric bounds. Creation types restrict settings and default values for these variants, and tests check valid and rejected property shapes.

Changes: Work-item property types

Layer / File(s) Summary
Property type contracts
src/models/common.ts, src/models/v2/WorkItemProperty.ts, src/models/WorkItemProperty.ts
The property type declarations add RATING and SLIDER. SliderSettings defines numeric min and max bounds. Rating and slider creation types prohibit settings and default values, and allow is_multi only as false or absent.
Type validation
tests/unit/property-types.test.ts
Tests check rating and slider type membership, slider settings, valid creation requests, and rejected creation shapes. They also check that customer-property creation rejects these types.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: akhil-vamshi-konam, prashant-surya, sriramveeraghanta

Merge Risk: Minimal · previous review 9ee7f

This change adds Rating and Slider work item property types to the SDK's type definitions. It does not change runtime behavior, so merge risk is minimal. Creating either property type still requires a Plane server that supports it.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: adding Rating and Slider work item property types. The raw summary shows the changes add RATING and SLIDER to PropertyType and WorkItemPropertyType, add create types a…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: adding Rating and Slider work item property types. The raw summary shows the changes add RATING and SLIDER to PropertyType and WorkItemPropertyType, add create types and SliderSettings, and add type tests. The title is specific, concise, and includes the ticket reference and conventional prefix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c8e9723-d410-4b5f-8938-9a24c51df7cb
Commits

Reviewing files that changed from the base of the PR and between 0eba2e3 and 9ee7f58.

Files selected for processing: 4

  • src/models/WorkItemProperty.ts
  • src/models/common.ts
  • src/models/v2/WorkItemProperty.ts
  • tests/unit/property-types.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@makeplane

makeplane Bot commented Nov 25, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

@Prashant-Surya
Prashant-Surya merged commit 6404b53 into main Nov 26, 2026
4 checks passed
@Prashant-Surya
Prashant-Surya deleted the feat/web-9926-slider-rating-property-types branch November 26, 2026 08:36
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