Skip to content

feat: pinned column#88

Merged
anton62k merged 1 commit intomasterfrom
feat/pinned-column
Feb 23, 2026
Merged

feat: pinned column#88
anton62k merged 1 commit intomasterfrom
feat/pinned-column

Conversation

@anton62k
Copy link
Contributor

@anton62k anton62k commented Feb 23, 2026

Summary by cubic

Adds support for pinning table columns to the left or right in table views. Updates the schema and tests to validate allowed values and combinations.

  • New Features
    • Added pinned property to Column schema with enum: left | right.
    • Validation covers pinned alone and with width; rejects invalid values (e.g., center).
    • Added tests for left/right, width + pinned, and invalid pinned.

Written for commit eb33b0c. Summary will update on new commits.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

Adds support for column pinning direction in the table views schema by introducing a new optional pinned property with enum values 'left' or 'right' to the Column definition, along with four test cases validating the new property.

Changes

Cohort / File(s) Summary
Schema Definition
src/validation-schemas/table-views-schema.ts
Adds optional pinned property to Column with type string and enum values ['left', 'right'].
Test Coverage
src/validation-schemas/__tests__/table-views-schema.spec.ts
Adds four test cases validating column with pinned left, pinned right, width and pinned together, and rejection of invalid pinned values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: pinned column' accurately summarizes the main change: adding support for a pinned column property to the table views schema.
Description check ✅ Passed The description is directly related to the changeset, explaining the new pinned property, validation coverage, and test additions for column pinning functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/pinned-column

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/validation-schemas/table-views-schema.ts (1)

59-59: LGTM — optional: consider whether null should be a valid pinned value

The addition is correct and consistent with the rest of the schema. One thing to think about: if the consumers of this schema use a table library (e.g., AG Grid) where explicitly un-pinning a column is represented as pinned: null or pinned: false, the current definition will reject that payload and require callers to omit the property entirely instead.

If explicit "unpin" round-trips are needed, you could widen the definition:

💡 Optional: allow explicit unpin via null
-        pinned: { type: 'string', enum: ['left', 'right'] },
+        pinned: { enum: ['left', 'right', null] },

If omission is the agreed contract for "unpinned," no change is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/validation-schemas/table-views-schema.ts` at line 59, The current schema
for the pinned property (pinned: { type: 'string', enum: ['left', 'right'] })
rejects explicit unpin values like null; update the pinned definition to accept
null as a valid explicit "unpinned" value (e.g., allow type to include 'null' or
add null to the enum) so consumers can round-trip explicit unpinning without
removing the property; locate and modify the pinned schema entry in
src/validation-schemas/table-views-schema.ts (symbol: pinned) and ensure the
change matches the project's JSON/schema style (type array vs. nullable/enum)
used elsewhere.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/validation-schemas/table-views-schema.ts`:
- Line 59: The current schema for the pinned property (pinned: { type: 'string',
enum: ['left', 'right'] }) rejects explicit unpin values like null; update the
pinned definition to accept null as a valid explicit "unpinned" value (e.g.,
allow type to include 'null' or add null to the enum) so consumers can
round-trip explicit unpinning without removing the property; locate and modify
the pinned schema entry in src/validation-schemas/table-views-schema.ts (symbol:
pinned) and ensure the change matches the project's JSON/schema style (type
array vs. nullable/enum) used elsewhere.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 900d7be and eb33b0c.

📒 Files selected for processing (2)
  • src/validation-schemas/__tests__/table-views-schema.spec.ts
  • src/validation-schemas/table-views-schema.ts

@anton62k anton62k merged commit 30ff653 into master Feb 23, 2026
7 checks passed
@anton62k anton62k deleted the feat/pinned-column branch February 23, 2026 17:25
anton62k added a commit that referenced this pull request Feb 23, 2026
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.

1 participant