-
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: #696 #700
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request updates multiple subproject commit identifiers across various directories and packages. In addition, it refines component type definitions and export styles. The modifications include a revised method return type in a TypeScript declaration, removal of unused properties, and adjustments to import/export statements in header and grouping column components. Overall, these changes update references to new commit hashes and streamline component interfaces without altering core functionality. Changes
Sequence Diagram(s)sequenceDiagram
participant H as RevogrHeaderComponent
participant C as ColumnGroupsRenderer
participant G as GroupHeaderRenderer
H->>C: Pass updated column data (cols)
C->>G: Delegate group header rendering
G-->>C: Return rendered header group
C-->>H: Return complete header view
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/plugins/groupingColumn/columnGroupsRenderer.tsx (1)
24-36
: Simplified and improved visibility detection logic.The new approach for determining visible groups:
- Extracts visible column indexes into an array
- Uses array operations to check if any column falls within a group's boundaries
- Makes the group visibility check more direct and efficient
This implementation directly supports the PR objective of grouping columns based on indexes rather than properties.
For even better readability, consider extracting the visibility check to a named function:
- // Check if any visible column is within this group's range - const isVisible = visibleIndexes.some(index => - index >= groupStartIndex && index <= groupEndIndex - ); + // Check if any visible column is within this group's range + const isVisible = isColumnGroupVisible(visibleIndexes, groupStartIndex, groupEndIndex);With an appropriate helper function defined at the top of the file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
docs
(1 hunks)formats/number
(1 hunks)packages/angular
(1 hunks)packages/react
(1 hunks)packages/svelte
(1 hunks)packages/vue2
(1 hunks)packages/vue3
(1 hunks)src/components.d.ts
(1 hunks)src/components/header/revogr-header.tsx
(2 hunks)src/plugins/groupingColumn/columnGroupsRenderer.tsx
(2 hunks)src/plugins/groupingColumn/headerGroupRenderer.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (7)
- packages/angular
- formats/number
- packages/vue2
- packages/react
- packages/vue3
- docs
- packages/svelte
🔇 Additional comments (8)
src/plugins/groupingColumn/headerGroupRenderer.tsx (1)
18-18
: Export standardization improves import consistency.The change from a non-exported constant to a named export aligns with modern JavaScript/TypeScript best practices and makes imports more explicit in consuming files.
src/components.d.ts (1)
157-157
:✅ Verification successful
Enhanced return type provides more detailed range information.
The updated return type for
getSelectedRange()
now includes dimension information (AllDimensionType
) along with the range data, which better supports the index-based column grouping approach described in the PR objectives.
🏁 Script executed:
#!/bin/bash # Check the implementation of getSelectedRange to ensure it returns the enhanced type # Look for the getSelectedRange method implementation rg "getSelectedRange\(\)" -A 10Length of output: 1705
Enhanced return type successfully integrates dimension info.
The updated signature in
src/components.d.ts
now accurately reflects thatgetSelectedRange()
returns a Promise resolving to(RangeArea & AllDimensionType) | null
. The implementation in bothsrc/components/revoGrid/viewport.service.ts
andsrc/components/revoGrid/revo-grid.tsx
confirms this change—using a normalization (via?? null
) to ensure a consistentnull
when no range is selected, even though the internal return type may includeundefined
.
- Confirmed that the returning value is enriched with dimension type details and supports the updated column grouping logic.
- Verified that the normalization in
revo-grid.tsx
ensures type consistency with the declaration incomponents.d.ts
.src/components/header/revogr-header.tsx (2)
15-15
: Import aligned with component's export style.Updated import statement correctly uses named import, reflecting the change in how ColumnGroupsRenderer is exported.
208-208
: Simplified props passing with direct column data.The props have been updated to pass
cols
directly rather than usingvisibleProps
, which aligns with the modified component API and supports the index-based column grouping approach described in the PR objectives.src/plugins/groupingColumn/columnGroupsRenderer.tsx (4)
3-5
: Import statements correctly updated to support new implementation.The changes to imports align with the component's new requirements and maintain consistency with the export style changes in HeaderGroupRenderer.
8-17
: Props interface improved to use direct column data.The Props type definition has been updated to use direct column data (
cols: PositionItem[]
) instead of the property mapping (visibleProps
), which aligns with the PR objective of grouping columns based on indexes rather than properties.
19-21
: Export style standardized for better module consistency.Changed from default export to named export, improving import/export consistency across the codebase.
57-59
: Improved group boundary tracking with clear comments.The renamed variables and added comments make the logic easier to follow, showing how the start index advances for the next group.
Summary by CodeRabbit
Chores
Refactor