Skip to content

Deprecate Popper component#1018

Merged
kotAPI merged 3 commits into
mainfrom
kotapi/popper-deprecation
Apr 3, 2025
Merged

Deprecate Popper component#1018
kotAPI merged 3 commits into
mainfrom
kotapi/popper-deprecation

Conversation

@kotAPI

@kotAPI kotAPI commented Apr 3, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores

    • Expanded automated process triggers to cover all source changes, ensuring a more robust quality and deployment workflow.
  • Refactor

    • Removed an outdated pop-up interface component and its associated demonstration, streamlining the overall UI library.
    • Enhanced tooltip component structure and error handling for improved robustness and clarity.

@kotAPI kotAPI linked an issue Apr 3, 2025 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request broadens the file path filters for two GitHub Actions workflows, allowing them to trigger on any changes within the entire src directory instead of just a specific UI subdirectory. Additionally, it removes the entire Popper component suite, including the main component, related context, hooks, fragments, and its Storybook story file. Furthermore, it introduces enhancements to the Tooltip component, including type safety improvements and updated error handling.

Changes

File(s) Change Summary
.github/workflows/build-rad-ui.yml
.github/workflows/chromatic.yml
Updated path filters from src/components/ui/** to src/** to trigger workflows for any file changes within the entire src directory.
src/components/tools/Popper/... Removed all Popper-related files including the main component (Popper.tsx), context (PopperContext.tsx), hook (usePopper.tsx), fragments (PopperContent.tsx, PopperRoot.tsx, PopperTrigger.tsx), and Storybook file (Popper.stories.tsx).
src/components/ui/Tooltip/context/TooltipContext.tsx Introduced TooltipContextType for improved type safety and updated context creation to use the new type.
src/components/ui/Tooltip/fragments/TooltipContent.tsx Enhanced error handling to ensure proper context usage within the component.
src/components/ui/Tooltip/fragments/TooltipRoot.tsx Expanded placement prop type to a specific union type and changed arrowRef type to SVGSVGElement.
src/components/ui/Tooltip/fragments/TooltipTrigger.tsx Added error handling to ensure the component is used within a valid context.
src/components/ui/Tooltip/tests/Tooltip.test.tsx Restructured tests to reflect the new Tooltip component hierarchy and updated expectation checks accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    Dev->>GH: Submit PR with modifications in src/
    GH->>GH: Evaluate changed files against updated path filters
    GH-->>Dev: Trigger build & Chromatic workflows
Loading

Poem

Oh, I’m a rabbit, hopping with delight,
Code changes made the workflows bright.
From narrow paths to a broader view,
The Popper suite is now adieu.
Leaping through commits with a joyful heart,
I celebrate clean code—a fresh new start!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between af86143 and fe7737e.

📒 Files selected for processing (5)
  • src/components/ui/Tooltip/context/TooltipContext.tsx (1 hunks)
  • src/components/ui/Tooltip/fragments/TooltipContent.tsx (1 hunks)
  • src/components/ui/Tooltip/fragments/TooltipRoot.tsx (2 hunks)
  • src/components/ui/Tooltip/fragments/TooltipTrigger.tsx (1 hunks)
  • src/components/ui/Tooltip/tests/Tooltip.test.tsx (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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)
.github/workflows/build-rad-ui.yml (1)

7-7: Expanded Path Filter for Build RAD UI Workflow

The path filter has been updated from targeting only src/components/ui/** to include all files under src/**. This change broadens the trigger scope, ensuring that any modifications in the entire src directory will now trigger the workflow. Please verify that this aligns with your CI/CD strategies, as it may lead to more frequent workflow runs. Additionally, consider updating the inline comment (currently "Only run when files in this directory change") to explicitly reflect the expanded scope if needed.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0c4699d and af86143.

📒 Files selected for processing (9)
  • .github/workflows/build-rad-ui.yml (1 hunks)
  • .github/workflows/chromatic.yml (1 hunks)
  • src/components/tools/Popper/Popper.tsx (0 hunks)
  • src/components/tools/Popper/context/PopperContext.tsx (0 hunks)
  • src/components/tools/Popper/context/usePopper.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperContent.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperRoot.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperTrigger.tsx (0 hunks)
  • src/components/tools/Popper/stories/Popper.stories.tsx (0 hunks)
💤 Files with no reviewable changes (7)
  • src/components/tools/Popper/context/usePopper.tsx
  • src/components/tools/Popper/fragments/PopperContent.tsx
  • src/components/tools/Popper/context/PopperContext.tsx
  • src/components/tools/Popper/fragments/PopperTrigger.tsx
  • src/components/tools/Popper/Popper.tsx
  • src/components/tools/Popper/stories/Popper.stories.tsx
  • src/components/tools/Popper/fragments/PopperRoot.tsx
🔇 Additional comments (1)
.github/workflows/chromatic.yml (1)

8-8: Expanded Path Filter for Chromatic Deployment Workflow

The path filter here has been modified to use 'src/**' instead of a more specific path. This change harmonizes with the update in the Build RAD UI workflow and ensures that any change within the src directory will trigger a Chromatic deployment. Please confirm that extending the trigger to all files in src/ is intentional and won’t lead to unnecessary deployments.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (5)
.github/workflows/build-rad-ui.yml (2)

1-28: Overall PR Objective Check and Component Deprecation Verification

The changes in this workflow update the file path filter to 'src/**', which broadens the trigger scope. However, there is no reference in this file to the deprecation of the Popper component described in the PR title. Please double-check that all changes related to Popper component removal have been applied elsewhere in the repository.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 15-15: wrong indentation: expected 6 but found 4

(indentation)


[error] 16-16: trailing spaces

(trailing-spaces)


[error] 22-22: trailing spaces

(trailing-spaces)


[error] 25-25: trailing spaces

(trailing-spaces)


7-7: Update Inline Comment for Clarity

The path filter 'src/**' now covers the entire src directory. Consider revising the comment (currently "Only run when files in this directory change") to clarify that the workflow now triggers on any changes within src.

.github/workflows/chromatic.yml (3)

1-37: Overall PR Objective Check and Component Deprecation Verification

This workflow also updates its file path filter to 'src/**', yet it does not include any modifications regarding the deprecated Popper component. Please ensure that the removal of all Popper-related files and references is complete.

🧰 Tools
🪛 actionlint (1.7.4)

25-25: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.35.1)

[error] 37-37: no new line character at the end of file

(new-line-at-end-of-file)


7-9: Clarify Inline Comment for File Path Filter

With the updated filter 'src/**', the inline comment ("Only run when files in this directory change") is now misleading. Update it to reflect that the trigger applies to any change within the entire src directory.


24-28: Node.js Version Consistency Check

This workflow uses actions/setup-node@v3 with Node.js version '18', while the build workflow uses version '20'. If this difference is intentional (e.g., due to compatibility with Chromatic), please confirm. Otherwise, consider aligning the Node.js versions across workflows for consistency.

🧰 Tools
🪛 actionlint (1.7.4)

25-25: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0c4699d and af86143.

📒 Files selected for processing (9)
  • .github/workflows/build-rad-ui.yml (1 hunks)
  • .github/workflows/chromatic.yml (1 hunks)
  • src/components/tools/Popper/Popper.tsx (0 hunks)
  • src/components/tools/Popper/context/PopperContext.tsx (0 hunks)
  • src/components/tools/Popper/context/usePopper.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperContent.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperRoot.tsx (0 hunks)
  • src/components/tools/Popper/fragments/PopperTrigger.tsx (0 hunks)
  • src/components/tools/Popper/stories/Popper.stories.tsx (0 hunks)
💤 Files with no reviewable changes (7)
  • src/components/tools/Popper/context/usePopper.tsx
  • src/components/tools/Popper/stories/Popper.stories.tsx
  • src/components/tools/Popper/fragments/PopperContent.tsx
  • src/components/tools/Popper/fragments/PopperRoot.tsx
  • src/components/tools/Popper/fragments/PopperTrigger.tsx
  • src/components/tools/Popper/context/PopperContext.tsx
  • src/components/tools/Popper/Popper.tsx

@kotAPI kotAPI merged commit 14c99fa into main Apr 3, 2025
@kotAPI kotAPI deleted the kotapi/popper-deprecation branch April 3, 2025 12:47
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.

Remove the usage of Popper.tsx component

1 participant