fix: Collapsible content never renders in controlled mode#8776
fix: Collapsible content never renders in controlled mode#8776ofried-acutis wants to merge 2 commits intomakeplane:previewfrom
Conversation
The Transition component with grid-rows-[0fr]/[1fr] animation prevents collapsible content from appearing. This affects sub-work items on issue detail pages — clicking the toggle arrow changes the arrow direction but the content never shows. Replace Transition with simple conditional rendering. The Transition animation classes (grid-rows-[0fr] to grid-rows-[1fr]) don't produce a visible expand/collapse effect, so removing them has no visual regression while fixing the broken toggle. Steps to reproduce: 1. Create an issue with sub-work items (sub-issues) 2. Open the issue detail page 3. Click the sub-work items toggle arrow 4. Content never appears despite arrow toggling
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces case entity linking functionality for associating Plane issues with external entities (policies, claims), including backend models, serializers, API endpoints, search/resolution utilities, frontend UI components, and internationalization updates. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Modal as Issue Creation Modal
participant EntityService as EntityLinkService
participant API as Backend API
participant DB as Database
User->>Modal: Enter issue details & select entity
Modal->>EntityService: search(type, query)
EntityService->>API: GET /search-entities?type=policy&q=...
API->>DB: Query policies via ILIKE
DB-->>API: Policy results
API-->>EntityService: {results: [...]}
EntityService-->>Modal: Search results
User->>Modal: Select policy from dropdown
Modal->>Modal: Store entityLink in pending state
User->>Modal: Submit form to create issue
Modal->>API: POST /issues/ (issue payload)
API->>DB: Create Issue
DB-->>API: Issue with ID
API-->>Modal: Issue created
Modal->>EntityService: create(issueId, entity_type, entity_id)
EntityService->>API: POST /issues/{id}/entity-links/
API->>API: resolve_entity(entity_type, entity_id)
API->>DB: Lookup policy/claim detail
DB-->>API: Entity detail
API->>DB: Create CaseEntityLink
DB-->>API: Link created
API-->>EntityService: Link response
EntityService-->>Modal: Success
Modal->>User: Issue created with entity link
sequenceDiagram
participant User as User
participant IssueView as Issue Peek Overview
participant Panel as EntityLinkPanel
participant Service as EntityLinkService
participant API as Backend API
participant DB as Database
User->>IssueView: Open issue
IssueView->>Panel: Mount with issueId
Panel->>Service: list(workspaceSlug, projectId, issueId)
Service->>API: GET /issues/{id}/entity-links/
API->>DB: Query CaseEntityLink records
DB-->>API: Links with issue_id
API->>API: Resolve entity details for each link
API->>DB: Lookup policies/claims
DB-->>API: Entity details
API-->>Service: {data: [{entity_type, label, role, detail}]}
Service-->>Panel: Links array
Panel->>Panel: Render link list
Panel-->>User: Display entity links in panel
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Comment Tip You can enable review details to help with troubleshooting, context usage and more.Enable the |
|
This PR was opened in error and includes commits that should not have been included. Could a maintainer please delete this PR entirely? It has been replaced by #8777 which contains only the intended fix. Thank you. |
Summary
The
Collapsiblecomponent inpackages/uinever shows its content when used in controlled mode (isOpenprop). This breaks sub-work items on issue detail pages — clicking the toggle arrow changes the arrow direction but the content never appears.Root Cause
The
Transitioncomponent from@headlessui/reactwithgrid-rows-[0fr]/grid-rows-[1fr]animation classes doesn't produce a visible expand/collapse effect, preventing content from rendering.Fix
Replace
Transitionwith simple conditional rendering ({localIsOpen && <div>...). The grid-rows animation wasn't visually working anyway, so there is no visual regression.Steps to Reproduce
Test Plan
isOpenprop) still worksSummary by CodeRabbit
Release Notes
New Features
UI/UX
Translations