Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: editor not visible in server-side-rendering #2513

Closed
wants to merge 5 commits into from
Closed

Conversation

Tirokk
Copy link
Member

@Tirokk Tirokk commented Oct 5, 2020

roschaefer Authored by roschaefer
Dec 14, 2019
Merged Dec 16, 2019


This is fixing a bug where sometimes the editor would not get displayed
until you click into the title text fields. This commit also removes
some obscure optimizations.

I'm really annoyed by the cruft that we still carry around until this
very day.

Every single line of untested code, which you left because you thought:
"Well sure this is going to improve performance!" is going to bite you.

roschaefer and others added 5 commits December 14, 2019 01:36
This is fixing a bug where sometimes the editor would not get displayed
until you click into the title text fields. This commit also removes
some obscure optimizations.

I'm really annoyed by the cruft that we still carry around until this
very day.

Every single line of untested code, which you left because you thought:
"Well sure this is going to improve performance!" is going to bite you.
- @roschaefer, I reverted the changes you made that were unrelated to
the server-side rendering issue with the editor... maybe we can put in a
separate PR with them, or a subset of them that doesn't remove the
reactivity of the editor placholder(?)
- maintain reactive placeholders
@Tirokk
Copy link
Member Author

Tirokk commented Oct 7, 2020

cypress[bot] Authored by cypress[bot]
Dec 14, 2019




Test summary

50 0 0 0


Run details

Project Human-Connection
Status Passed
Commit e8c4624
Started Dec 16, 2019 11:37 AM
Ended Dec 16, 2019 11:52 AM
Duration 15:10 💡
OS Linux Ubuntu Linux - 16.04
Browser Chromium 79

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@@ -129,7 +117,7 @@ export default {
},
},
},
created() {
Copy link
Member Author

Choose a reason for hiding this comment

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

mattwr18 Authored by mattwr18
Dec 16, 2019


Outdated (history rewrite) - original diff


@@ -107,29 +106,7 @@ export default {
       return extensions
     },
   },
-  watch: {
-    value: {
-      immediate: true,
-      handler: function(content, old) {
-        const contentHash = stringHash(content)
-        if (!content || contentHash === this.lastValueHash) {
-          return
-        }
-        this.lastValueHash = contentHash
-        this.$nextTick(() => this.editor.setContent(content))
-      },
-    },
-    placeholder: {
-      immediate: true,
-      handler: function(val) {
-        if (!val || !this.editor) {
-          return
-        }
-        this.editor.extensions.options.placeholder.emptyNodeText = val
-      },
-    },
-  },
-  created() {

code creep? @roschaefer ... why were these changes made in this context?
this has the undesired side effect that makes the placeholder text not reactive, but also now instead of just approving and merging, we need to discuss what these changes have anything to do with fixing the server side-rendering bug

Copy link
Member Author

Choose a reason for hiding this comment

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

mattwr18 Authored by mattwr18
Dec 16, 2019


sorry, I reverted your changes @roschaefer because I know that you are busy today with your talk, and I'd like to get this bug fix in today's deploy. Normally, I would like to discuss this before making the decision, but under the circumstances, I felt it more important to get the bug fix in....

@Mogge Mogge closed this Oct 8, 2020
@ulfgebhardt ulfgebhardt deleted the pr2513head branch January 7, 2021 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants