Comments (1)
This is very bad and unpredictable behavior.
Agreed.
You can solve it like this - when the user goes to the hypha editing page - for everyone else this page is blocked with an warning like "Someone is already editing this hypha, please wait."
It's a good exploit to make whole wiki uneditable by opening the edit page for every hypha there is. Also, how do we determine that there is an edit going on? Not every visit to /edit/$hypha
ends up with a successful edit. Do we impose a timeout? How long?
That's difficult.
simply notify the user about such a problem without blocking the page.
This is the closest to what I will propose later in this message.
The hardest option is to use different branches and allow the user to resolve merge conflicts.
This option is not considered because MycorrhizaWiki uses only one branch by design.
My design
A similar alcorithm is used on some wiki engines and, surprisingly, forum engines (replying to thread that had changed while you were writing your messages).
- When an editor visits
/edit/$hypha
, we save latest revision's hash or timestamp. Let's say it'sA
. - When the same editor saves the edit, before that, we save latest revision's hash or timestamp. Let's say it's
B
.
If there was no edit done by anyone else between these two points of time (A = B), save successfully. Otherwise (A ≠ B), warn the user with something like The hypha you are trying to edit has been changed. Look at the changes:; the user is supposed to adjust their document to match the new edit.
A and B can saved in the user's cookies. Even though the user can modify the cookies, it won't break anything.
I guess this can be implemented someday.
from mycorrhiza.
Related Issues (20)
- `silentGitsh` ignores environment variables HOT 1
- Changing passwords HOT 10
- Make a new category auto-complete based on JavaScript
- Category descriptions
- Mycorrhiza 1.15 HOT 2
- Categories is not available HOT 8
- Make -create-admin more known HOT 1
- Rename hypha renames git repo instead HOT 5
- custom.css file HOT 6
- Caching static resources HOT 2
- Replace default static files HOT 5
- naming hypha 'wiki' results in unexpected behavior HOT 1
- A proper admin creation
- Language should be picked in settings by admins, not on client
- External links with a globe icon should always be on the same line HOT 7
- Add local time buttons in the editor
- Interwiki transclusion
- Can't remove media file from hypha HOT 4
- Math/LaTeX support in markup HOT 2
- Decrease tab-size HOT 1
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 mycorrhiza.