Add Tailwind prefix sorting#136
Conversation
|
@coderabbitai review pr |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch PR details
gh pr view 136 --repo avencera/rustywind
echo "---FILES CHANGED---"
gh pr diff 136 --repo avencera/rustywindLength of output: 25976
PR Review: Add Tailwind prefix sortingThe implementation is well-structured overall — good use of 🔴 Breaking change:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (22)
📝 WalkthroughWalkthroughThis PR adds support for Tailwind v3 and v4 prefixed class names (e.g., ChangesTailwind prefix support feature
Sequence DiagramsequenceDiagram
participant Client as User/CLI
participant RW as RustyWind
participant PS as PatternSorter
participant HS as HybridSorter
participant Norm as normalize_<br/>tailwind_prefix
Client->>RW: sort_classes_vec(classes,<br/>prefix="tw")
RW->>RW: Check Sorter type
alt PatternSorter with prefix
RW->>RW: Get prefixed_pattern_sorter("tw")
RW->>HS: new_with_tailwind_prefix(Some("tw"))
else HashMap-based Sorter
RW->>RW: Build SortCandidate vec<br/>(original, normalized)
end
RW->>PS: get_sort_key("tw:text-lg")
PS->>Norm: normalize_tailwind_prefix("tw:text-lg", "tw")
Norm-->>PS: "text-lg"
PS->>PS: parse & extract properties<br/>from "text-lg"
PS-->>RW: SortKey(class="text-lg",<br/>is_negative=false, ...)
RW->>RW: sort candidates by key
RW-->>Client: sorted classes<br/>(original:"tw:text-lg")
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
Summary
Add explicit Tailwind prefix support for sorting class lists.
--tailwind-prefixCLI optionCloses: #135
Summary by CodeRabbit
New Features
--tailwind-prefixCLI option for specifying Tailwind prefix variants.Breaking Changes
RustyWindnow requires explicittailwind_prefixfield in struct literals.PatternSorteris no longer a unit struct; usenew()ordefault()constructors.