Skip to content

fix(files): Add smooth animation via clicking on heading - #7197

Merged
mejo- merged 1 commit into
mainfrom
enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked
Jun 20, 2025
Merged

fix(files): Add smooth animation via clicking on heading#7197
mejo- merged 1 commit into
mainfrom
enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked

Conversation

@JuliaKirschenheuter

Copy link
Copy Markdown
Contributor

📝 Summary

🏁 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
  • Documentation (README or documentation) has been updated or is not required

@JuliaKirschenheuterJuliaKirschenheuter self-assigned this May 6, 2025
@codecov

codecovBot commented May 6, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 58.97%. Comparing base (865a88f) to head (f754128).
Report is 177 commits behind head on main.

Files with missing linesPatch %Lines
src/components/Editor/TableOfContents.vue0.00%3 Missing ⚠️
src/plugins/headingAnchor.js0.00%3 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #7197 +/- ##
==========================================
+ Coverage 51.85% 58.97% +7.12% 
==========================================
Files 479 482 +3 Lines 41580 37117 -4463 Branches 1002 1048 +46 ==========================================
+ Hits 21561 21891 +330 + Misses 19914 15124 -4790 + Partials 105 102 -3 

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

@JuliaKirschenheuter
JuliaKirschenheuter marked this pull request as ready for review May 8, 2025 13:53
@JuliaKirschenheuter
JuliaKirschenheuterforce-pushed the enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked branch from 5944b1a to 7ebc209CompareMay 8, 2025 13:54

@max-nextcloudmax-nextcloud left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and works for me. Code changes also seem fine.

@mejo-

mejo- commented May 8, 2025

Copy link
Copy Markdown
Member

Mhh, interesting. For me, this PR breaks anchor links. Whenever I click on the # next to a heading, it scrolls back to the beginning of the document.

@mejo-

mejo- commented May 8, 2025

Copy link
Copy Markdown
Member

Mhh, interesting. For me, this PR breaks anchor links. Whenever I click on the # next to a heading, it scrolls back to the beginning of the document.

It doesn't scroll back to the top of the document, but scrolls the clicked heading into the middle of the screen if possible. I guess that's a bit counter-intuitive and I would expect the heading to scrolled to the top of the editor container.

Comment threadsrc/components/Editor/TableOfContents.vue Outdated
Comment threadsrc/plugins/headingAnchor.js Outdated
Comment threadsrc/components/Editor/TableOfContents.vue Outdated
Comment threadsrc/components/Editor/TableOfContents.vue Outdated
@JuliaKirschenheuter
JuliaKirschenheuter marked this pull request as draft June 6, 2025 06:50
@JuliaKirschenheuter
JuliaKirschenheuterforce-pushed the enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked branch from 8c8b55b to dce5bd5CompareJune 10, 2025 17:39
@JuliaKirschenheuter
JuliaKirschenheuter marked this pull request as ready for review June 10, 2025 17:40
@JuliaKirschenheuter

Copy link
Copy Markdown
ContributorAuthor

@mejo- Hi Jonas,

could you please look into this again? Thank you!

Comment threadsrc/components/Editor/TableOfContents.vue Outdated
@juliusknorrjuliusknorr added the bug Something isn't working label Jun 18, 2025
@juliusknorrjuliusknorr added this to the Nextcloud 32 milestone Jun 18, 2025
@JuliaKirschenheuter
JuliaKirschenheuterforce-pushed the enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked branch from dce5bd5 to 1ade190CompareJune 18, 2025 10:22
@mejo-

Copy link
Copy Markdown
Member

/backport to stable31

@mejo-

Copy link
Copy Markdown
Member

/backport to stable30

@mejo-mejo- left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prettier complains about prosemirror.css. Once this got resolved, it's ready to merge 😊

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
@JuliaKirschenheuter
JuliaKirschenheuterforce-pushed the enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked branch from 1ade190 to f754128CompareJune 20, 2025 13:07
@mejo-

Copy link
Copy Markdown
Member

The failing assistant cypress test seems unrelated. It also fails on other PRs.

@mejo-
mejo- merged commit 2945b46 into mainJun 20, 2025
@mejo-
mejo- deleted the enh/6974-Maybe-have-an-animation-for-scrolling-to-the-heading-once-clicked branch June 20, 2025 15:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewbugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table of contents: Maybe have an animation for scrolling to the heading once clicked

5 participants

@JuliaKirschenheuter@mejo-@juliusknorr@max-nextcloud@skjnldsv