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

Added notes don't show up with hearts #34

Open
MayamaTakeshi opened this issue Apr 29, 2023 · 2 comments
Open

Added notes don't show up with hearts #34

MayamaTakeshi opened this issue Apr 29, 2023 · 2 comments

Comments

@MayamaTakeshi
Copy link
Owner

MayamaTakeshi commented Apr 29, 2023

Testing with
https://github.com/cat-in-136/redmine_hearts
when we add a quick note, the note is added dynamically in the issue but the heart doesn't show up.
This happens because the code that adds the hearts ("transplant hearts") operates at the client side by doing a JQuery(ELEMENTS_TO_OPERATE).each() inside a callback to event 'load' (page finished loading).

See:
https://github.com/cat-in-136/redmine_hearts/blob/2bbab489e0534d52b142901f0352e667b874ec5f/assets/javascripts/transplant_heart_link_with_counter.js

So this kind of issue cannot be solved by redmine_rt. It would be necessary to adjust redmine_hearts to for example, override the redmine views so that the hearts come with the HTML from the server.

@MayamaTakeshi
Copy link
Owner Author

Then we can eventually integrate it with redmine_rt to show likes updated in real-time.

@MayamaTakeshi
Copy link
Owner Author

However moving the addition of the heart transplant to the server side code might not be doable.
Because although this might be easy to do for an issue, it might not be doable for journals because currently redmine doesn't have a partial for it. So we cannot use Deface:Override for it.

So, we might need to do something like:
Add redmine_hearts javascript code react to websocket notifications.
Make ajax call to get value of the heart for the specific Heartable element and update the heart.

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

No branches or pull requests

1 participant