Comments (7)
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.
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.
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.
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.
Fixed by azuls latest changes 🎉
from collectives.
In GitLab by @azul on Aug 23, 2020, 16:09
mentioned in commit 55bdad5
from collectives.
In GitLab by @azul on Aug 23, 2020, 16:11
mentioned in commit bed968e
from collectives.
Related Issues (20)
- Mirror pages across collectives HOT 1
- Backlinks not showing HOT 1
- Show parent pages on the dashboard widget
- Issue with sharing collectives to groups HOT 4
- Shortcut to display page structure
- Linking pages improvements (meta issue) HOT 1
- Collectives content disappears when shared without editing rights HOT 4
- UI: make header (sections) collapsible HOT 1
- Setup check for sqlite module for full text search
- Option to delete attachments without going into Files app HOT 2
- Use Text API endpoint to list attachments
- Anchor links not working in read-only mode
- when sorting by title pages are unable to be dragged under other pages HOT 4
- Collectives with ~500-1k files leads to unresponsive browsers
- The ability to edit formatting keybinds HOT 1
- (Feature Request) Allow any page to show recent subpages
- Easy Page Linking HOT 2
- (Feature Request) Set Custom Image in Emoji Field HOT 1
- Add limit to group feature HOT 1
- Pressing Ctrl+S while editing a page title leads to downloading undefined.html HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectives.