Skip to content

[WEB-4017] fix: hooks and store refactoring for issue-details#7107

Merged
sriramveeraghanta merged 8 commits intopreviewfrom
feat-pages-in-work-items
Jun 18, 2025
Merged

[WEB-4017] fix: hooks and store refactoring for issue-details#7107
sriramveeraghanta merged 8 commits intopreviewfrom
feat-pages-in-work-items

Conversation

@gakshita
Copy link
Collaborator

@gakshita gakshita commented May 22, 2025

Description

  • Created useWorkItemProperties for any issue specific top level logic
  • Extended IssueDetails store in CE's IssueDetails store.

References

[WEB-4017]

Summary by CodeRabbit

  • New Features
    • Added a hook to enhance work item property handling in issue overview and detail pages.
  • Refactor
    • Updated class structure for improved extensibility in issue detail management.
  • Chores
    • Adjusted import paths and added a proxy module for consistent hook usage across editions.
  • Style
    • Improved responsive padding behavior in settings content wrapper for medium screen sizes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 22, 2025

Walkthrough

A new hook, useWorkItemProperties, was introduced for managing work item properties, with usage added in key issue detail and overview components. Supporting changes include an abstract class update for IssueDetail, import path adjustments, and a re-export for enterprise compatibility. A padding style adjustment was also made in a settings wrapper component.

Changes

File(s) Change Summary
web/ce/hooks/use-issue-properties.tsx, web/ee/hooks/use-issue-properties.tsx Added useWorkItemProperties hook; EE version re-exports CE implementation.
web/core/components/issues/peek-overview/root.tsx, web/app/(all)/.../page.tsx Invoked useWorkItemProperties in issue overview and detail page components with relevant parameters.
web/core/hooks/store/use-issue-detail.ts Updated import path for IIssueDetail type.
web/core/store/issue/issue-details/root.store.ts Changed IssueDetail from a concrete to an abstract class.
web/core/components/settings/content-wrapper.tsx Modified padding style for "md" size variant in SettingsContentWrapper component.

Sequence Diagram(s)

sequenceDiagram
    participant Component as IssueDetailsPage / IssuePeekOverview
    participant Hook as useWorkItemProperties

    Component->>Hook: useWorkItemProperties(projectId, workspaceSlug, workItemId, issueServiceType)
    Note right of Hook: Returns early if any parameter is falsy
Loading

Possibly related PRs

  • makeplane/plane#6930: Refactors hooks to accept issueServiceType, closely related to the new hook's parameterization.
  • makeplane/plane#6891: Adds EIssueServiceType usage in command palette actions, related via handling of issue types.
  • makeplane/plane#6902: Adds issueServiceType prop to work item widgets, related via shared context of issueServiceType usage.

Suggested labels

🌐frontend, 🛠️refactor

Suggested reviewers

  • prateekshourya29
  • sriramveeraghanta

Poem

A hook hops in, so fresh and spry,
To fetch work item details on the fly.
Abstracted classes, imports anew,
Components now know just what to do!
With every change, the code grows bright—
Another leap for Plane, oh what a sight!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@makeplane
Copy link

makeplane bot commented May 22, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

@gakshita gakshita marked this pull request as ready for review May 23, 2025 07:52
@gakshita gakshita requested a review from prateekshourya29 May 23, 2025 07:53
Copy link
Contributor

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

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8cc24 and 5c5c9f5.

📒 Files selected for processing (8)
  • web/app/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (2 hunks)
  • web/ce/hooks/use-issue-properties.tsx (1 hunks)
  • web/ce/store/issue/issue-details/root.store.ts (1 hunks)
  • web/core/components/issues/peek-overview/root.tsx (2 hunks)
  • web/core/hooks/store/use-issue-detail.ts (1 hunks)
  • web/core/store/issue/root.store.ts (1 hunks)
  • web/ee/hooks/use-issue-properties.tsx (1 hunks)
  • web/ee/store/issue/issue-details/root.store.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
web/ce/hooks/use-issue-properties.tsx (1)
web/core/store/router.store.ts (2)
  • projectId (85-87)
  • workspaceSlug (69-71)
web/app/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (2)
web/ce/hooks/use-issue-properties.tsx (1)
  • useWorkItemProperties (1-1)
web/core/store/router.store.ts (3)
  • projectId (85-87)
  • workspaceSlug (69-71)
  • issueId (149-151)
web/core/components/issues/peek-overview/root.tsx (1)
web/ce/hooks/use-issue-properties.tsx (1)
  • useWorkItemProperties (1-1)
🔇 Additional comments (7)
web/core/hooks/store/use-issue-detail.ts (1)

7-7: Import path updated for new store structure.

The import path change aligns with the store restructuring to separate CE and EE implementations. This improves modularity and maintainability.

web/core/store/issue/root.store.ts (1)

8-8: Import path updated for consistent store architecture.

The change from relative to absolute import path supports the new modular store structure and improves code organization.

web/core/components/issues/peek-overview/root.tsx (1)

26-26: Import statement for new hook.

The import path follows the new module structure established in the PR.

web/app/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (1)

19-19: Import path looks good.

The import statement correctly references the hook from the unified path that handles both CE and EE versions.

web/ee/hooks/use-issue-properties.tsx (1)

1-1: Good use of re-export pattern for CE/EE separation.

This follows the established architectural pattern where EE modules proxy CE implementations, allowing for future enterprise-specific overrides while maintaining a unified import path.

web/ee/store/issue/issue-details/root.store.ts (1)

1-1: Consistent re-export pattern for store separation.

This maintains the established CE/EE architectural pattern, allowing enterprise editions to extend or override the community edition store implementation when needed.

web/ce/store/issue/issue-details/root.store.ts (1)

1-5: Imports and type definitions look correct.

The imports properly reference the core store components and required types. The type re-export maintains interface consistency.

@gakshita gakshita marked this pull request as ready for review June 4, 2025 12:40
Copy link
Contributor

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e7d3a8a and 48ec926.

📒 Files selected for processing (1)
  • web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (2)
web/ce/hooks/use-issue-properties.tsx (1)
  • useWorkItemProperties (3-10)
web/core/store/router.store.ts (3)
  • projectId (85-87)
  • workspaceSlug (69-71)
  • issueId (149-151)
🔇 Additional comments (2)
web/app/(all)/[workspaceSlug]/(projects)/browse/[workItem]/page.tsx (2)

9-9: LGTM!

The enum import is clean and follows established patterns.


20-20: LGTM!

The hook import follows the established import structure and naming conventions.

@gakshita gakshita changed the title [WEB-4017] fix: hooks and store splitting for issue-details [WEB-4017] fix: hooks and store refactoring for issue-details Jun 9, 2025
Copy link
Contributor

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/core/components/settings/content-wrapper.tsx (1)

15-15: Mobile padding eliminated – confirm UX intent

Switching from p-4 to md:px-4 removes all horizontal padding on screens smaller than the md breakpoint. Content in the settings view will now sit flush against the viewport edge on mobile, which can feel cramped and mis-aligned compared to other pages that keep a baseline px-4/px-6.

If that wasn’t a deliberate design call, consider re-introducing a small-screen padding:

-        "md:px-4 max-w-[800px] 2xl:max-w-[1000px]": size === "md",
+        "px-4 md:px-4 max-w-[800px] 2xl:max-w-[1000px]": size === "md",

(or sm:px-4 if you prefer Tailwind’s sm breakpoint).

Please verify across the mobile breakpoints before merging.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d9a5c5 and 5bdf8ec.

📒 Files selected for processing (1)
  • web/core/components/settings/content-wrapper.tsx (1 hunks)

@sriramveeraghanta sriramveeraghanta merged commit c7d17d0 into preview Jun 18, 2025
4 of 5 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat-pages-in-work-items branch June 18, 2025 10:29
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* fix: hooks and store splitting for issue-details

* fix: refactoring

* fix: refactoring

* fix: refactor

* fix: css
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.

4 participants