Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Merge requests
  • !8356

Merged
Created Dec 28, 2016 by Fatih Acet@fatihacet🤙Contributor

Refactor discussion edit widget to have only one at a time.

  • Overview 45
  • Commits 16
  • Pipelines 7
  • Changes 12

This merge request is a performance improvement for issues and merge requests page. Before this MR, for master users we had one hidden note edit form for every single discussion in the page. This was the reason our DOM is bloated hundreds of unnecessary hidden elements. For example, this MR has 369 discussions in it therefore 16974 hidden elements on the page for edit forms.

With this MR, we will only have one hidden note edit form and we will move it around in the DOM when we want to edit a comment. In Merge Requests page, I also needed to clone and have second hidden edit form because you may want to edit a discussion in MR Discussions tab and also one in the Changes tab.

This MR is like a heavy jQuery stuff, but otherwise it could require a lot of refactor on notes.js. I also considered rewriting them with Vue.js but again, too much refactor would be needed so this is what we have right now.

Reviewer must test this in locally and try to break it. Here is the screencast.

_note-edit-widget

Fixes #23227 (closed)

Assignee
Assign to
Reviewer
Request review from
8.16
Milestone
8.16 (Past due)
Assign milestone
Time tracking
Source branch: single-edit-comment-widget-2