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

💻 Realtime updates #4646

Closed
hasan-sh opened this issue Oct 19, 2023 · 5 comments
Closed

💻 Realtime updates #4646

hasan-sh opened this issue Oct 19, 2023 · 5 comments
Assignees

Comments

@hasan-sh
Copy link
Contributor

Idea incl level
Currently, whenever the user makes an action, we mostly "reload" the page or redirect them. However, this isn't the best UX. For instance, removing a class, student and an adventure isn't reflected in the UI of all parties.

Additional context
This is problematic when different parties make changes simultaniously; e.g., after allowing second teachers to make changes (#4644). Use socketio or something similar.

@TiBiBa
Copy link
Collaborator

TiBiBa commented Oct 20, 2023

I have quite some experiencing with implementing Soketi websockets in a project. Please let me know if you need any help!

https://docs.soketi.app

@hasan-sh hasan-sh moved this to ToBeDiscussed in Hedy organization board Oct 24, 2023
@hasan-sh hasan-sh moved this from ToBeDiscussed to Long Term in Hedy organization board Nov 14, 2023
mergify bot pushed a commit that referenced this issue Dec 5, 2023
… time (#4812)

Fixes #4804 
**Problem**
1. The main issue spawns from having the _username_ as the partion_key for the invitations table, thereby preventing adding multiple invitations for the same user. 
2. Also, even if this worked, users currently only see one invitation at the time; due to restricting messages to be 0 or 1. _This is now changed as well._
3. There are a couple of things in the code that are inconsistent; e.g., https://github.com/hedyorg/hedy/blob/main/website/database.py#L737-L738 would remove _an invitation_ of the username, while the function name implies deleting an invitation to some class!

**Solution**
- create a unique, partition_key `username#class_id` in the INVITATIONS table.
- with two independent indexes: `username` and `class_id`
- allow second teachers (perhaps students later on as well!) to accept more than one invitation at the same time.
  - The reason we have messages in the session is mainly to display a number indicator in the profile dropdown menu. Logically, this should happen whenever teachers invite other users and these invitees do not have to reload the page to see the indicator, but now they do!
  - this should be fixed when we have realtime updates #4646!

**How to test?**
Follow the steps that Rico listed in #4804.
@Felienne Felienne changed the title [UI idea] Realtime updates 💻 Realtime updates May 30, 2024
@Felienne Felienne moved this from Long Term to ToBeDiscussed in Hedy organization board May 30, 2024
@Felienne
Copy link
Member

Hi @hasan-sh!

I know we have now done this in some places (creating adventures) but I am not sure where else. It is totally ok if you leave this one, but can you make a list here of places where it needs to be done still, to ease handover?

@Felienne
Copy link
Member

Hi @Annelein!

Can you pick this up for the /admin page?

@Annelein Annelein moved this from ToBeDiscussed to In Progress in Hedy organization board Jun 25, 2024
@Annelein
Copy link
Contributor

Annelein commented Jun 26, 2024

@Felienne the admin page didn't need autosave, just htmx: #5631
I can however look into creating a list of pages for which it would be nice to implement autosave?

@Felienne
Copy link
Member

#5631

Awesome, thanks!!

I can however look into creating a list of pages for which it would be nice to implement autosave?

Love your proactive spirit, thanks! Sounds like a great idea to make this list, we can then prioritize in a next meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

4 participants