# Shared-Edits Improvements

**URL:** https://meta.discourse.org/t/shared-edits-improvements/232713
**Category:** UX
**Tags:** shared-edits
**Created:** [October 29, 2021, 2:37pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713 "2021-10-29T14:37:15Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [October 29, 2021, 2:37pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/1 "2021-10-29T14:37:15Z")

</div>

We did some further testings on odd behaviours of the - otherwise great - [shared edit mode](https://meta.discourse.org/t/discourse-shared-edits/167583). Here are some findings:

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/f/1f0ce7ac899f3ddfbb8e38a87898d78d72d4608e.png)

> Note that the plugin does not enable edit _access_ per se. This means that if you want non-moderators to be able to collaboratively edit the post you must also make the post a Wiki (green, optional):

If I enabled Shared Edits, I have the option to make it a wiki, too. But if I do so via the `Make Wiki` option, it still reads “Make Wiki”. It will enter Wiki mode, though. But there is no way to revoke the Wiki.

> Moderators can toggle shared edits on a topic (red) via the gear icon on the composer bar

I would like to see an option, where the right to start/stop shared edits is linked to the right to start/end a wiki. The functionality is quite similar, why choosing different rights (mods only)?

Now this is a critical one:

1. I set a posting into wiki **and** shared edit mode
2. Some people start editing away in the shared edit composer
3. Some _other_ people use the “classic” wiki editor - via the revisions link on the same posting at the same time:

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/3/23b655c435a5f884a7b77f0a8581f3edfa3b3a37.png)

and then at the bottom `Edit Post`

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/7/37afca6694834ded0df93135eae5391372fd52d7.png)

Now things get ugly real quick. Like - reeeealy ugly. Lots of overwritten stuff, changes not saved, revision conflicts. My understanding is, that shared edits is not designed to work _at the same time_ as classic wiki editing (completely understandable from a technical view).

I figure the best way to solve this would be to redirect the `Edit Post` button to the new shared edits composer?

Hence the shared edits composer doesn’t offer the option to edit the metadata of the posting (titel, tags etc.), there has to be a solution for that, too.

One could argue “just tell your people to stay away from the revisions-pencil”, but this is not how it works - a lot of our users like this way instead of scrolling down to the end of a long WikiPad posting.

I see this might not an easy one to be fixed, but right now the shared edits feature is quite broken. We’ve tried it on several postings with different people, and _always_ conflicts arose.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [November 19, 2021, 8:59am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/2 "2021-11-19T08:59:53Z")

</div>

Any news on this? We “fixed” it by adding

```plaintext
div#revision-footer-buttons button:nth-of-type(1) {
    display: none !important;
}

```

to the CSS, but quite obviously this is a fix, not a solution…

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [November 19, 2021, 10:34pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/3 "2021-11-19T22:34:52Z")

</div>

> [@Ralf\_Stockmann](#):
>
> ```plaintext
> div#revision-footer-buttons button:nth-of-type(1) {
> display: none !important;
> }
> 
> ```

You have articulated really clearly how the wiki functionality and the shared edits interact. And it isn’t pretty. Thanks for the workaround / fix!!

I rolled it into my little [Wikified Posts Component](https://meta.discourse.org/t/wikified-posts-component/199492) as it is a nice little enhancement of wiki functionality.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [November 22, 2021, 8:54am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/5 "2021-11-22T08:54:47Z")

</div>

Ah - I didn’t knew about our Component, very useful (I just used the old one to color Wiki-posts and will switch now)

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [December 12, 2021, 8:34pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/7 "2021-12-12T20:34:42Z")

</div>

You can add this to your theme `common > header` tab (or in `/common/header.html` in a remote component), and it will add a `shared-edits-post` class to shared-edit posts if the current user can edit them.

```xml
<script type="text/discourse-plugin" version="0.8">
  api.addPostClassesCallback((attrs) => {
    if (attrs.shared_edits_enabled && attrs.canEdit) return ["shared-edits-post"];
  });
</script>

```

then in CSS

```scss
.shared-edits-post {
  // do some work
}

```

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [December 13, 2021, 12:06pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/8 "2021-12-13T12:06:41Z")

</div>

> [@Discourse Shared Edits](https://meta.discourse.org/t/discourse-shared-edits/167583/46):
>
> Would like to be able to create a theme component like “Wikified Posts Component” for this.

Done!! It is all rolled into the Wikified Posts Component now:

> [@Wikified Posts Component](https://meta.discourse.org/t/wikified-posts-component/199492/8):
>
> Have just updated the component to better cater for Shared Edits posts. This includes adapting it for the Shared Edits changes here:

* * *

> [@Johani](#):
>
> `.shared-edits-post`

Thanks Joe - made it all possible!!

What I really need to target is the first revision-footer-button (with the text Edit Wiki) and hide it for Shared Edits posts only. Any way to get that class to cover the revision panel / dialogue too?

---

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [December 15, 2021, 12:55am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/9 "2021-12-15T00:55:00Z")

</div>

I pushed a few changes.

[https://github.com/discourse/discourse-shared-edits/pull/31](https://github.com/discourse/discourse-shared-edits/pull/31)

> [@Ralf\_Stockmann](#):
>
> If I enabled Shared Edits, I have the option to make it a wiki, too. But if I do so via the `Make Wiki` option, it still reads “Make Wiki”. It will enter Wiki mode, though. But there is no way to revoke the Wiki.

This is fixed. Toggling wiki on/off on a shared edit post will now show the correct label.

> [@Ralf\_Stockmann](#):
>
> I figure the best way to solve this would be to redirect the `Edit Post` button to the new shared edits composer?

This is also fixed. If you click the button from the revision history modal AND the post is set to `shared-edit` it will open the shared-edits composer instead of the default one.

> [@nathank](#):
>
> If you find out how to target Shared Edits posts

I added the class in the plugin. So, you can remove the snippet you added. The plugin will now add that class without needing any modification.

> [@Discourse Shared Edits](https://meta.discourse.org/t/discourse-shared-edits/167583/50):
>
> What I really need to target is the first revision-footer-button (with the text Edit Wiki) and hide it for Shared Edits posts only

I’m guessing you wanted that because the button used to open the default composer? That’s now fixed, so you won’t need to hide it anymore.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [February 7, 2022, 2:43pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/10 "2022-02-07T14:43:47Z")

</div>

> [@Ralf\_Stockmann](#):
>
> I would like to see an option, where the right to start/stop shared edits is linked to the right to start/end a wiki. The functionality is quite similar, why choosing different rights (mods only)?

This is still a dealbreaker for us: we try to have as few moderators as possible for privacy reasons. Hence we would LOVE to have an option that everyone who can start a wiki can also start the shared edits - basically it’s the same. By the way: we named this mode “WikiPad” - it’s more striking than shared edits.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 7, 2022, 11:27pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/11 "2022-02-07T23:27:37Z")

</div>

Sure totally open to add a setting for “groups that are allowed to start shared edits” default to “staff” but allow you to change it to whatever you want.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [March 22, 2022, 12:43pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/13 "2022-03-22T12:43:29Z")

</div>

What are the chances to make this happen? Again - this little tweak would be a gamechanger in our everyday work.

---

<div class="post-metadata">

### Author: ![literarymachine](https://avatars.discourse-cdn.com/v4/letter/l/7cd45c/32.png) [@literarymachine](https://meta.discourse.org/u/literarymachine)
#### Post date: [May 16, 2022, 2:21pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/14 "2022-05-16T14:21:27Z")

</div>

Thanks for this great plugin, which fits in really well with our use-cases to use Discourse to collaboratively take notes, brainwrite etc. While examining the plugin I have occasionally experienced glitches though, which are unfortunately hard to consistently reproduce.

What I have experienced is that a change done by user A is undone when user B updates the document, both changes being explicitly saved using the Save-button. I am assuming it could be caused by network connectivity and managed to reproduce the behavior as follows:

- Both browsers start with a shared state of the document:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/1/a/d/1ad8621df1b2cca4766c02cc8467d6896d23cecf.png)
- Browser 2 looses connection (but the user does not notice this):  
 ![image](https://global.discourse-cdn.com/meta/original/4X/9/c/6/9c68ac38ff33507c491825836b9c1c72a2fe242a.png)
- Browser 1 saves a change:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/6/b/2/6b22f2e655f1154b19c9fd80c64c1a9779564592.png)
- Browser 2 makes a changes while still offline:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/f/1/f/f1fba2e31864544e67068ffed64914344199b858.png)
- Browser 2 is back online and saves the change:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/f/9/f/f9fd91fa38587465c66267e85562a61c5458e3d5.png)
- Change done in Browser 2 is saved, undoing the previous change made in Browser 1:  
 ![image](https://global.discourse-cdn.com/meta/original/4X/6/7/5/6756f2dde2ca07580209eb7829271f8b07c490e5.png)

I know this seems quite artificial, but it was the only to reproduce the behavior I am experiencing every now and then. Has anybody else encountered this issue? Is there perhaps even a fix for it?

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [May 27, 2022, 8:15am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/15 "2022-05-27T08:15:32Z")

</div>

> [@literarymachine](#):
>
> Has anybody else encountered this issue?

Yes I stumbled across a similar issue with a bad Internet connection, sometimes losing quite a bunch of edits. This is very frustrating. Maybe some disconnection detection could work and switch to a localStorage buffer or something. Maybe using a localStorage-first and synchronize later… I’m not sure how it is implemented technically, but surely there are some times where having the synchronization delayed by a few milliseconds would be better than losing text.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [June 14, 2022, 2:29pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/16 "2022-06-14T14:29:20Z")

</div>

This is still a huge issue on our site. Maybe thsi information may help: see this edit in the history:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/a/0/1a0b42857fd08aa38060a5fe0e26a7fcd3a5c0da.png)

“system” is the system root account. Why is there no user account displayed? Another variant is this:

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/c/9/3c929fe86277d9e4eb3881cedea457c1adc1e658.png)

It’s still assigned to system, but with an additional “edited by xy” info. Strange.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 13, 2022, 8:25am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/17 "2022-07-13T08:25:24Z")

</div>

Hi @Ralf_Stockmann 🙂

I’ve split your posts into a new #Contribute > UX topic to stop them getting eaten by the topic-timer. I think there may be a couple of issues included that may be worth tracking separately (I think @Johani’s fix dealt with some?). If so, let me know and we can create a fresh topic(s) for them. 👍

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [July 14, 2022, 7:45am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/18 "2022-07-14T07:45:52Z")

</div>

Thanks - but I’m missing now the postings by @literarymachine on this toppic (a colleague of mine) where he pointed out some network-related race-conditions of this plugin, which a) are still not fixed and b) render this otherwise fantastic plugin rather useless for serious work…?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 14, 2022, 8:16am UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/19 "2022-07-14T08:16:09Z")

</div>

I think that should be it. 🤞

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [February 13, 2023, 8:37pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/20 "2023-02-13T20:37:07Z")

</div>

> [@sam](#):
>
> Sure totally open to add a setting for “groups that are allowed to start shared edits” default to “staff” but allow you to change it to whatever you want.

This has come up for us and would be super helpful.

Would a PR be useful for this? Official Plugin PRs are pretty challenging for hacks like me as they require more setup and expertise that I have readily at hand!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 13, 2023, 8:52pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/21 "2023-02-13T20:52:48Z")

</div>

Tl4 are now allowed to toggle shared edits, so this gives you a fair bit more flexibility

Pr is welcome to switch it to a group based site setting

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [April 28, 2024, 11:57pm UTC](https://meta.discourse.org/t/shared-edits-improvements/232713/22 "2024-04-28T23:57:57Z")

</div>

> [@sam](#):
>
> Tl4 are now allowed to toggle shared edits

How about moderators? Or do they need to be bumped up to TL4?

As they can bump themselves up to TL4 anyway, it would make sense to grant them all the ability to activate Shared Edits.
