Skip to content

refactor: migrate from PortalToFollowElem to Popover component across various components#35454

Merged
CodingOnStar merged 17 commits intomainfrom
feat/popover-migration
Apr 21, 2026
Merged

refactor: migrate from PortalToFollowElem to Popover component across various components#35454
CodingOnStar merged 17 commits intomainfrom
feat/popover-migration

Conversation

@CodingOnStar
Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

This commit updates multiple components to replace the PortalToFollowElem with the new Popover component, enhancing the UI consistency and functionality. The changes include adjustments in the trigger and content handling for the Popover, ensuring proper event management and styling. Additionally, tests have been updated to reflect these changes.

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

CodingOnStar and others added 12 commits April 17, 2026 17:16
…ponents in model provider and plugin detail panels
…ves and update deprecation message in constants
…cross various components

This commit updates multiple components to replace the PortalToFollowElem with the new Popover component, enhancing the UI consistency and functionality. The changes include adjustments in the trigger and content handling for the Popover, ensuring proper event management and styling. Additionally, tests have been updated to reflect these changes.
@CodingOnStar CodingOnStar requested a review from lyzno1 April 21, 2026 06:30
@github-actions github-actions Bot added the web This relates to changes on the web. label Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 87.58170% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.54%. Comparing base (3b24d8d) to head (057de05).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...s/_base/components/variable/var-reference-vars.tsx 77.27% 5 Missing ⚠️
...mponents/variable/var-reference-picker.trigger.tsx 86.36% 3 Missing ⚠️
...nodes/_base/components/agent-strategy-selector.tsx 85.71% 2 Missing ⚠️
...ents/delivery-method/recipient/member-selector.tsx 50.00% 2 Missing ⚠️
...ge-retrieval/components/metadata/add-condition.tsx 0.00% 2 Missing ⚠️
...components/workflow/block-selector/tool-picker.tsx 93.75% 1 Missing ⚠️
..._base/components/variable/var-reference-picker.tsx 92.30% 1 Missing ⚠️
...orkflow/nodes/if-else/components/condition-add.tsx 66.66% 1 Missing ⚠️
...dition-list/condition-common-variable-selector.tsx 85.71% 1 Missing ⚠️
...s/workflow/nodes/loop/components/condition-add.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #35454      +/-   ##
==========================================
+ Coverage   85.51%   85.54%   +0.02%     
==========================================
  Files        4437     4438       +1     
  Lines      207128   207214      +86     
  Branches    38589    38623      +34     
==========================================
+ Hits       177120   177253     +133     
+ Misses      26897    26850      -47     
  Partials     3111     3111              
Flag Coverage Δ
dify-ui 93.01% <ø> (ø)
web 86.43% <87.58%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CodingOnStar CodingOnStar changed the title refactor(web): migrate from PortalToFollowElem to Popover component across various components refactor: migrate from PortalToFollowElem to Popover component across various components Apr 21, 2026
CodingOnStar added 3 commits April 21, 2026 15:05
…component in tests

This commit finalizes the transition from the PortalToFollowElem to the Popover component across various test files. The updates include the implementation of Popover's context and trigger handling, ensuring consistent behavior in the UI. All relevant tests have been adjusted to reflect these changes, enhancing the overall test coverage and reliability.
…der prop

This commit modifies the PopoverTrigger component in multiple test files to accept React.ReactNode instead of React.ReactElement for the render prop. The implementation has been simplified to enhance readability and maintainability, ensuring consistent behavior across tests.
…ents

This commit introduces new test files for the AgentStrategySelector and SearchInput components. The tests cover various functionalities, including user interactions and state management, ensuring robust validation of component behavior. Mocks for dependencies are implemented to isolate tests and enhance reliability.
@CodingOnStar CodingOnStar marked this pull request as ready for review April 21, 2026 09:57
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Apr 21, 2026
@dosubot dosubot Bot added javascript Pull requests that update javascript code refactor labels Apr 21, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 21, 2026
@CodingOnStar CodingOnStar added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit d65a6b4 Apr 21, 2026
33 checks passed
@CodingOnStar CodingOnStar deleted the feat/popover-migration branch April 21, 2026 10:19
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
… various components (langgenius#35454)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
asukaminato0721 pushed a commit to asukaminato0721/dify that referenced this pull request Apr 24, 2026
… various components (langgenius#35454)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code lgtm This PR has been approved by a maintainer refactor size:XXL This PR changes 1000+ lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants