Skip to content

fix(NcCustomPickerElement): destroy elements that are still rendering - #9257

Open
DerDreschner wants to merge 1 commit into
mainfrom
fix/custom-picker-element-pending-render
Open

DerDreschner wants to merge 1 commit into
mainfrom
fix/custom-picker-element-pending-render

Conversation

@DerDreschner

Copy link
Copy Markdown
Contributor

☑️ Resolves

Closing the Smart Picker while a custom element was still loading called its onDestroy without a render result, which fails in the pickers that expect one. The element was rendered afterwards and never destroyed.

  • onDestroy is now called once the element is rendered, so async callbacks have to return their promise.
  • Errors in onDestroy are logged.

Pickers that use a ref in $nextTick after mounting, like those of Deck and Profile, log an error if they are closed while loading, because they are now unmounted right after they mounted.

🚧 Tasks

  • Test in Text and Talk

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

AI (if applicable)

  • The content of this PR was partly or fully generated using AI
    each commit containing AI-assisted content must include a git trailer: Assisted-by: AGENT_NAME:MODEL_VERSION

@DerDreschner
DerDreschner requested a review from a team as a code owner November 29, 2026 22:29
@DerDreschner DerDreschner added this to the 9.15.0 milestone Nov 29, 2026
@DerDreschner DerDreschner added bug Something isn't working 3. to review Waiting for reviews feature: richtext Related to the richtext component feature: smart picker labels Nov 29, 2026
@DerDreschner DerDreschner self-assigned this Nov 29, 2026
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.12%. Comparing base (4c2c010) to head (b634fda).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9257      +/-   ##
==========================================
+ Coverage   61.34%   62.12%   +0.78%     
==========================================
  Files         131      131              
  Lines        4778     4790      +12     
  Branches     1446     1452       +6     
==========================================
+ Hits         2931     2976      +45     
+ Misses       1569     1543      -26     
+ Partials      278      271       -7     

☔ View full report in Codecov by Harness.
📢 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.

Closing the picker while a custom element was still loading called its
onDestroy without a render result, which fails in the pickers that
expect one. The element was rendered afterwards and never destroyed.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner
DerDreschner force-pushed the fix/custom-picker-element-pending-render branch from 7716a08 to b634fda Compare November 29, 2026 22:54
@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable8

@pringelmann pringelmann modified the milestones: 9.15.0, 9.16.0 Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request bug Something isn't working feature: richtext Related to the richtext component feature: smart picker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants