-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Notify users that the page has been updated and incite a reload #16130
Conversation
The @MeetIng variable was still showing the old timestamps, as only the association got updated. This feels weird, but saves a #reload.
modules/meeting/app/components/meetings/update_flash_component.sass
Outdated
Show resolved
Hide resolved
4c7d5c2
to
21f7178
Compare
updated_at breaks when uploading attachments, as the same page will be updated without us having a chance to update the header. Instead, calculate an "etag" value from the meeting sections and agenda items timestamps as well as the meeting's own lock_version.
21f7178
to
f9252c1
Compare
9191cbd
to
f5fc32e
Compare
This allows for a more stable check in tests, avoiding race conditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, just few notes code wise, also when testing I noticed a problematic issue, as the flash is shown also following my own actions on the page, which will be very confusing, at least it does for adding/removing/renaming sections. I am thinking only of some way of section/agenda item actions to update the checksum in stimulus controller if it is still the same as one that we have.
Was Action cable considered, or is this use "too much" to start using Action cable in the project?
modules/meeting/app/components/meetings/side_panel/state_component.html.erb
Outdated
Show resolved
Hide resolved
modules/meeting/app/controllers/meeting_agenda_items_controller.rb
Outdated
Show resolved
Hide resolved
frontend/src/stimulus/controllers/poll-for-changes.controller.ts
Outdated
Show resolved
Hide resolved
frontend/src/stimulus/controllers/poll-for-changes.controller.ts
Outdated
Show resolved
Hide resolved
frontend/src/stimulus/controllers/poll-for-changes.controller.ts
Outdated
Show resolved
Hide resolved
We missed updating the meeting from the service update, which resulted in the incorrect header being updated. This appears to be fixed now, although we are aware with this approach of using dependent values that we'll likely miss more cases where the dialog accidentally triggers. That's one reason why it's still behind a feature flag for now.
We want to introduce ActionCable as soon as we can use the PostgreSQL adapter. I believe that this is now possible with Turbo 8, but someone would have to take a look at the exact details. |
I only understood now that the updating I mentioned was already there, done through turbo stream. MeetingSectionsController has Also I noticed that |
There is still a way to miss changes due to polling which can be easily displayed by moving sections, and I also saw a problem with the state of sections.
Problem with state is that in second window despite the order being |
@toy we address the remarks regarding the header. For the quick subsequent reorders, we opened an open point since it's inherent to the way section reordering works with acts_as_list (not sending the full order to the backend, but only updating parts of it). Discussion for that continues in https://community.openproject.org/work_packages/57331 If you agree, we'd like to merge this in |
modules/meeting/app/components/meetings/header_component.html.erb
Outdated
Show resolved
Hide resolved
I agree, it is anyway behind a feature flag. I commented on the way it is added when checking on it |
https://community.openproject.org/projects/openproject/work_packages/56801
Documenting the new component and using it to replace streamable_flash_banner will be done in https://community.openproject.org/projects/openproject/work_packages/56802