Git Product home page Git Product logo

Comments (7)

mejo- avatar mejo- commented on June 14, 2024

In GitLab by @azul on May 18, 2020, 16:02

There's at least two ways to approach this:

  • synchronize in the browser - get the current text state in the editor and update the currentPage
  • synchronize from the server - repeatedly check for changes from the server and update browser state by retrieving updated docs.

I kind of prefer the second as it would also get updates for wikis someone else is editing.

from collectives.

mejo- avatar mejo- commented on June 14, 2024

We definitely should fetch the updated page content from server. There's more situations when we want to update the currentPage content.

While working on version handling (!18), I realized that we also need a way to update the currentPage content in order to display earlier page versions.

My current idea is to implement a method getPageContent() in PagePreview.vue and make it fetch either the latest page content (by file path) or the old revision content (by file ID and version timestamp).

from collectives.

mejo- avatar mejo- commented on June 14, 2024

Once !20 got merged we probably should give edit as prop to PagePreview.vue, watch it there and call getPageContent() whenever edit changes from true to false.

Does this sound like a sensible approach to you, @azul?

from collectives.

mejo- avatar mejo- commented on June 14, 2024

In GitLab by @azul on Jul 26, 2020, 11:03

@mejo- the approach sounds sensible to me.

There's another aspect playing into this. We also need to store the current state of the editor when turning off edit mode. Currently the stored file is sometimes out of sync with the editor. I believe that the state of the doc is only stored every 5 seconds or so. I believe the text editor in the viewer app also stores it when closing the viewer. We should do the same when switching to edit mode.

from collectives.

mejo- avatar mejo- commented on June 14, 2024

Fixed by azuls latest changes 🎉

from collectives.

mejo- avatar mejo- commented on June 14, 2024

In GitLab by @azul on Aug 23, 2020, 16:09

mentioned in commit 55bdad5

from collectives.

mejo- avatar mejo- commented on June 14, 2024

In GitLab by @azul on Aug 23, 2020, 16:11

mentioned in commit bed968e

from collectives.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.