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

Comments support #632

Merged
merged 30 commits into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d3027ac
Add backend support for comments
juliusknorr Oct 4, 2018
41db5d0
Load comments entity for app
juliusknorr Oct 4, 2018
339bc34
Add basic comments frontend
juliusknorr Oct 4, 2018
2e824f0
Add backbone comment classes
juliusknorr Oct 4, 2018
63337c1
Add comment event handler for activities
juliusknorr Oct 4, 2018
ffd32a8
Enhance activity list with comment data
juliusknorr Oct 4, 2018
e547a5d
Add comment action menu
juliusknorr Oct 4, 2018
f5520d3
Implement comment deletion and loading indicator
juliusknorr Oct 5, 2018
630a5ba
Sidebar design improvements
juliusknorr Oct 5, 2018
ddeefd5
Move contenteditable directive to separate file
juliusknorr Oct 5, 2018
63a34e7
Properly inject ICommentsManager
juliusknorr Oct 5, 2018
e29efe8
Fix tests
juliusknorr Oct 5, 2018
310af37
Implement user mentioning in frontend
juliusknorr Oct 6, 2018
e0ac86a
Inject user manager
juliusknorr Oct 6, 2018
97b7bca
Fix eslint errors
juliusknorr Oct 6, 2018
93c3c54
Fix styling and proper template rendering
juliusknorr Oct 6, 2018
f66f4e0
Send notification on user mention
juliusknorr Oct 6, 2018
691c72d
Use board users for @-mentioning
juliusknorr Oct 8, 2018
46720dc
Fix jslint errors
juliusknorr Oct 8, 2018
dcc3601
Implement editing comments
juliusknorr Oct 8, 2018
9363f86
Add UI feedback for comment deletion
juliusknorr Oct 8, 2018
5f8c46b
Fix issue when switching between cards
juliusknorr Oct 8, 2018
3e8451e
Fix unread comment count
juliusknorr Oct 8, 2018
3a36f7d
Fix racecondition during loading of comments
juliusknorr Oct 8, 2018
cb3c083
Fix user id in mention notification
juliusknorr Oct 8, 2018
27f9707
Allow submit of comments using shift+enter
juliusknorr Oct 8, 2018
5edb95f
Fix codacy issues
juliusknorr Oct 9, 2018
da0cfdb
Add unit tests for comment handling
juliusknorr Oct 9, 2018
68880fc
Add test for mention notifications
juliusknorr Oct 9, 2018
4779d3a
Tests: Comment actrivity parsing
juliusknorr Oct 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@
$app = new \OCA\Deck\AppInfo\Application();
$app->registerNavigationEntry();
$app->registerNotifications();
$app->registerCommentsEntity();

/** Load activity style global so it is availabile in the activity app as well */
\OC_Util::addStyle('deck', 'activity');
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- 🚀 Get your project organized

</description>
<version>0.5.0-dev3</version>
<version>0.5.0-dev4</version>
<licence>agpl</licence>
<author>Julius Härtl</author>
<namespace>Deck</namespace>
Expand Down
77 changes: 77 additions & 0 deletions css/autocomplete.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* based upon apps/comments/js/vendor/At.js/dist/css/jquery.atwho.css,
* only changed colors and font-weight
*/

.atwho-view {
position:absolute;
top: 0;
left: 0;
display: none;
margin-top: 18px;
background: var(--color-main-background);
color: var(--color-main-text);
border: 1px solid var(--color-border);
border-radius: var(--border-radius);
box-shadow: 0 0 5px var(--color-box-shadow);
min-width: 120px;
z-index: 11110 !important;
}

.atwho-view .atwho-header {
padding: 5px;
margin: 5px;
cursor: pointer;
border-bottom: solid 1px var(--color-border);
color: var(--color-main-text);
font-size: 11px;
font-weight: bold;
}

.atwho-view .atwho-header .small {
color: var(--color-main-text);
float: right;
padding-top: 2px;
margin-right: -5px;
font-size: 12px;
font-weight: normal;
}

.atwho-view .atwho-header:hover {
cursor: default;
}

.atwho-view .cur {
background: var(--color-primary);
color: var(--color-primary-text);
}
.atwho-view .cur small {
color: var(--color-primary-text);
}
.atwho-view strong {
color: var(--color-main-text);
font-weight: normal;
}
.atwho-view .cur strong {
color: var(--color-primary-text);
font-weight: normal;
}
.atwho-view ul {
/* width: 100px; */
list-style:none;
padding:0;
margin:auto;
max-height: 200px;
overflow-y: auto;
}
.atwho-view ul li {
display: block;
padding: 5px 10px;
border-bottom: 1px solid var(--color-border);
cursor: pointer;
}
.atwho-view small {
font-size: smaller;
color: var(--color-main-text);
font-weight: normal;
}
4 changes: 4 additions & 0 deletions css/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
background-image: url('../../../core/img/places/home.svg');
}

.icon-description {
background-image: url('../img/description.svg');
}

.icon-badge {
background-image: url('../img/calendar-dark.svg');
}
Expand Down
70 changes: 68 additions & 2 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ $compact-board-last-item-margin: 5px 10px 10px;
@import 'icons';
@import 'animations';
@import 'compact-mode';
@import 'autocomplete';

/**
* General styles
Expand Down Expand Up @@ -454,9 +455,10 @@ input.input-inline {
opacity: 1;
}

.icon-filetype-text {
.icon-description {
margin: 10px;
margin-left: 0px;
opacity: 0.5;
}

.due {
Expand Down Expand Up @@ -492,7 +494,7 @@ input.input-inline {
}
}

.card-tasks, .card-files {
.card-tasks, .card-files, .card-comments {
border-radius: 3px;
margin: 4px 4px 4px 0px;
padding: 0 2px;
Expand Down Expand Up @@ -937,6 +939,63 @@ input.input-inline {
}
}

.activity-icon {
opacity: 1 !important;
.avatardiv-container {
top: -4px;
left: -7px;
margin-right: 5px;
img {
max-width: 24px;
max-height: 24px;
}
}
}

.activitysubject.commentAuthor {
margin-left: 26px;
margin-right: 0;
margin-top: 10px;
}
.activityTabView {
.activity {
margin-bottom: 20px;
}
.activitytime {
margin: 0 !important;
}
}
.activitysubject .app-popover-menu-utils {
display: inline-block;
a {
font-weight: normal;
}
button {
opacity: .5;
padding: 7px;
margin-left: 10px;
}
}

#commentsTabView {
.newCommentRow .avatardiv-container {
left: -7px;
}
.comment {
position: relative;
padding: 0 0 15px;

.avatardiv {
width: 24px;
height: 24px;
line-height: 24px;
}
}
.newCommentForm {
margin-left: 26px;
}
}

.card-attachments {
.error {
padding-left: 38px;
Expand Down Expand Up @@ -1250,6 +1309,13 @@ input.input-inline {
clear: both;
overflow: initial;
margin-bottom: 0;
.icon {
display: inline-block;
background-size: contain;
margin: -3px;
margin-right: 5px;
opacity: 0.5;
}
}

.tabsContainer {
Expand Down
1 change: 1 addition & 0 deletions img/description.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions js/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import md from 'angular-markdown-it';
import nganimate from 'angular-animate';
import 'angular-file-upload';
import ngInfiniteScroll from 'ng-infinite-scroll';
import '../legacy/jquery.atwho.min';
import '../legacy/jquery.caret.min';

var app = angular.module('Deck', [
ngsanitize,
Expand Down
8 changes: 4 additions & 4 deletions js/app/Run.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
import app from './App.js';

Expand Down
Loading