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

GH-74 - Collaborative awareness #71

Merged
merged 12 commits into from
Mar 6, 2024
Merged

GH-74 - Collaborative awareness #71

merged 12 commits into from
Mar 6, 2024

Conversation

bosschaert
Copy link
Contributor

@bosschaert bosschaert commented Feb 28, 2024

Description

Show the currently editing other users as little icons in the top right corner:
editing

When the editor is disconnected from da-collab, or the network in general, show this via a disconnected cloud icon.

Motivation and Context

To make the editing more robust in case of a disconnection with da-collab and also to provide awareness of other users active in the document.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Release notes

  • Adds the ability to see cloud connection status
  • Adds the ability to see fellow collaborators that are actively editing the document
  • Improves collaboration connection reliability

Resolves: GH-74

If the user is know their initial is displayed.
If the user is not known a generic 'user' icon is displayed.

When hovering over the icon the full name is shown as a tooltip.

When collab is disconnected disable the editor until it reconnects.
Copy link

aem-code-sync bot commented Feb 28, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Also react to network (dis)connects as reported by the browser.
Make firstUpdate async to give the ydoc a chance to init itself.
@aem-code-sync aem-code-sync bot temporarily deployed to awrz2 March 5, 2024 16:13 Inactive
@auniverseaway
Copy link
Member

auniverseaway commented Mar 6, 2024

Test URL: https://awrz2--da-live--adobe.hlx.page/edit#/adobecom/da-milo-college/demo

From my commit message:

  • Simplified integration between prose/index and da-title.
  • prose/index only responsible for data, da-title is presentation.
  • Turned user icon into clickable initial pill. Clicking shows full name popover.
  • Cloud is also clickable for more detailed status

Left out of commit message:

  • I changed the behavior so that if you are the only one on the doc, we do not show the user pills. It seemed like that was a little heavy given that there's already the connected cloud icon.
  • Hovering over each icon will change the stacking order and provide a little visual cue that you can click on it (needs to be a button).

To do later:
These should probably be buttons, but I'm tired.

Bigger picture thoughts:

  • I really liked this pattern of presenting the component with data and letting it determine the view. Especially as it relates to reactivity.
  • I think we are over complicating the whole user set / delta thing, but leaving for now as it's not a big deal.

Observation:
On my local, I could not get pushing to the live preview to work. It seems to work fine on branches. If you have time, can you reproduce or find out if this was pre-existing and I can take a look?

Edit: Fixed.

@auniverseaway
Copy link
Member

Ugh. The tests broke as a result of moving prose/index to being data based instead of DOM based. I'll try to get these updated tomorrow. I think it should be relatively simple as we now can check for properties on a daTitle DOM element.

* Simplified integration between prose/index and da-title.
* prose/index only responsible for data, da-title is presentation.
* Turned user icon into clickable initial pill. Clicking shows full name popover.
* Cloud is also clickable for more detailed status
@auniverseaway
Copy link
Member

Screenshot 2024-03-05 at 9 59 51 PM

@auniverseaway auniverseaway changed the title Show currently active other users and react to connection status GH-74 - Collaborative awareness Mar 6, 2024
@auniverseaway auniverseaway merged commit a65eba4 into main Mar 6, 2024
3 of 4 checks passed
@auniverseaway auniverseaway deleted the awrz2 branch March 29, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collaborative Awareness
3 participants