Skip to content

refactor(links): derive link bubble state in plugin state apply - #9556

Merged
mejo- merged 1 commit into
mainfrom
fix/link_bubble_state_from_state
Nov 9, 2026
Merged

mejo- merged 1 commit into
mainfrom
fix/link_bubble_state_from_state

Conversation

@mejo-

@mejo- mejo- commented Nov 5, 2026

Copy link
Copy Markdown
Member

The link bubble plugin used appendTransaction to work out the active link from the selection, which dispatched an extra transaction on every selection change. Do this in the plugin state's apply() instead, which gets the old and new state as arguments.

This also replaces the full document comparison (doc.eq) with tr.docChanged, and adds tests for the derived bubble state.

Assisted-by: ClaudeCode:claude-opus-5-5

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

The link bubble plugin used appendTransaction to work out the active
link from the selection, which dispatched an extra transaction on every
selection change. Do this in the plugin state's apply() instead, which
gets the old and new state as arguments.

This also replaces the full document comparison (doc.eq) with
tr.docChanged, and adds tests for the derived bubble state.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo- mejo- self-assigned this Nov 5, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 5, 2026
@nextcloud-command nextcloud-command added the AI assisted This PR contains AI-assisted commits label Nov 5, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Nov 5, 2026
@mejo-
mejo- merged commit 1374c4c into main Nov 9, 2026
63 of 65 checks passed
@mejo-

mejo- commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

/backport to stable35

@mejo-
mejo- deleted the fix/link_bubble_state_from_state branch November 9, 2026 12:23
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Nov 9, 2026
@backportbot

backportbot Bot commented Nov 9, 2026

Copy link
Copy Markdown

The backport to stable35 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable35
git pull origin stable35

# Create the new backport branch
git checkout -b backport/9556/stable35

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 6a151397

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/9556/stable35

Error: Failed to create pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"A pull request already exists for nextcloud:backport/9556/stable35."} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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

Labels

3. to review AI assisted This PR contains AI-assisted commits technical debt

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

3 participants