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

feat: add ability to post comment to project messages #1322

Merged
merged 10 commits into from
Sep 10, 2021

Conversation

djaiss
Copy link
Member

@djaiss djaiss commented Sep 8, 2021

This PR adds the ability to add comments to... anything. We just started with project messages.

We've added a Comment object that can be morphed with commentable. We just need to add this association to other objects now to add comments to anything.

Comments are a dedicated shared Vue class, so we can apply to anything we want.

The class takes a prop called postUrl. It's not super elegant, but it allows us to pass an endpoint and the class knows how to submit, edit and delete a comment based on this URL.

image

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

Images automagically compressed by Calibre's image-actions

Compression reduced images by 21.4%, saving 936 bytes.

Filename Before After Improvement Visual comparison
public/img/streamline-icon-avatar-neutral@100x100.png 4.27 KB 3.36 KB -21.4% View diff

64 images did not require optimisation.

@djaiss djaiss marked this pull request as ready for review September 9, 2021 03:07
@djaiss djaiss requested a review from a team as a code owner September 9, 2021 03:07
@djaiss djaiss requested review from asbiin and removed request for a team September 9, 2021 03:07
Copy link
Contributor

@asbiin asbiin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, as always.
Not much to mention, except for the v-html directive which here is dangerous!

app/Models/Company/Employee.php Show resolved Hide resolved
app/Models/Company/Company.php Show resolved Hide resolved
app/Models/Company/Comment.php Show resolved Hide resolved
resources/js/Shared/Comments.vue Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Sep 10, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

89.8% 89.8% Coverage
13.6% 13.6% Duplication

@djaiss djaiss merged commit f9c57da into main Sep 10, 2021
@djaiss djaiss deleted the 2021-09-07-comments-to-tasks branch September 10, 2021 22:06
@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants