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 AutoCompletion #6982

Merged
merged 33 commits into from
Nov 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fd6daf8
AutoCompletion backend
blizzz Aug 30, 2017
8f0a9ae
split walking the tree from operating on it
blizzz Oct 11, 2017
8722458
ensure that sorting is stable
blizzz Oct 11, 2017
04fafdd
fix class name in info.xml
blizzz Oct 12, 2017
8e60a2b
add At.js and dependencies
blizzz Oct 16, 2017
d1afbed
setup atwho autocomplete
blizzz Oct 17, 2017
df0e72d
contenteditable divs should look like textareas
blizzz Oct 17, 2017
ec56075
turn textarea to contenteditable div
blizzz Oct 17, 2017
8d9f485
when writing a comment, render mentions as they'd appear anywhere
blizzz Oct 18, 2017
ccbcce9
convert mentions after save to the plain format we use
blizzz Oct 19, 2017
de8a475
fix contactsmenu-popup
blizzz Oct 20, 2017
eb8f124
fix unstable comment order
blizzz Oct 23, 2017
fb40afc
enable autocomplete when editing comments
blizzz Oct 23, 2017
3628d4d
avoid unnecessary recursion
blizzz Oct 25, 2017
fa2f039
add search parameter to autocomplete controller
blizzz Oct 25, 2017
dcc4e7d
add config parameter sample
blizzz Oct 25, 2017
aa2fd30
autocomplete on demand
blizzz Oct 25, 2017
7f58c41
fix sorting
blizzz Oct 26, 2017
eace507
apply our theming
blizzz Oct 26, 2017
bd951e9
avatar css fixes
blizzz Oct 27, 2017
ca72c01
configurable amount of autocomplete results in comments
blizzz Oct 27, 2017
20e7a0c
fix sharerecipientssorter tests
blizzz Oct 27, 2017
76c803f
add acceptance tests
blizzz Oct 28, 2017
61db861
preserve line breaks
blizzz Oct 30, 2017
d5f1cef
fix comment sorter
blizzz Oct 30, 2017
4b24dea
only ship minimized js files
blizzz Oct 31, 2017
bcfac75
simplify registration of manager in server container
blizzz Oct 31, 2017
d0f2f5f
remove more vendor-imported files that aren't necessary
blizzz Oct 31, 2017
582d2d3
fix avatar loading for generic placeholders
blizzz Oct 31, 2017
25aad12
meanwhile we can have exact matches. also show those.
blizzz Oct 31, 2017
2b4b3b1
adjust jsunit tests
blizzz Nov 1, 2017
e2805f0
Merge branch 'master' into autocomplete-gui
blizzz Nov 1, 2017
f1570c2
update autoloader
blizzz Nov 1, 2017
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
3 changes: 3 additions & 0 deletions apps/comments/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "js/vendor"
}
1 change: 1 addition & 0 deletions apps/comments/appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
function() {
\OCP\Util::addScript('oc-backbone-webdav');
\OCP\Util::addScript('comments', 'merged');
\OCP\Util::addStyle('comments', 'autocomplete');
\OCP\Util::addStyle('comments', 'comments');
}
);
Expand Down
6 changes: 6 additions & 0 deletions apps/comments/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@
<provider>OCA\Comments\Activity\Provider</provider>
</providers>
</activity>

<collaboration>
<plugins>
<plugin type="autocomplete-sort">OCA\Comments\Collaboration\CommentersSorter</plugin>
</plugins>
</collaboration>
</info>
2 changes: 2 additions & 0 deletions apps/comments/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
'OCA\\Comments\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php',
'OCA\\Comments\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php',
'OCA\\Comments\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\Comments\\Collaboration\\CommentersSorter' => $baseDir . '/../lib/Collaboration/CommentersSorter.php',
'OCA\\Comments\\Controller\\Notifications' => $baseDir . '/../lib/Controller/Notifications.php',
'OCA\\Comments\\EventHandler' => $baseDir . '/../lib/EventHandler.php',
'OCA\\Comments\\JSSettingsHelper' => $baseDir . '/../lib/JSSettingsHelper.php',
'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php',
);
2 changes: 2 additions & 0 deletions apps/comments/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ class ComposerStaticInitComments
'OCA\\Comments\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php',
'OCA\\Comments\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php',
'OCA\\Comments\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\Comments\\Collaboration\\CommentersSorter' => __DIR__ . '/..' . '/../lib/Collaboration/CommentersSorter.php',
'OCA\\Comments\\Controller\\Notifications' => __DIR__ . '/..' . '/../lib/Controller/Notifications.php',
'OCA\\Comments\\EventHandler' => __DIR__ . '/..' . '/../lib/EventHandler.php',
'OCA\\Comments\\JSSettingsHelper' => __DIR__ . '/..' . '/../lib/JSSettingsHelper.php',
'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php',
);
Expand Down
77 changes: 77 additions & 0 deletions apps/comments/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: $color-main-background;
color: $color-main-text;
border: 1px solid $color-border;
border-radius: 3px;
box-shadow: 0 0 5px $color-box-shadow;
min-width: 120px;
z-index: 11110 !important;
}

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

.atwho-view .atwho-header .small {
color: $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: $color-primary;
color: $color-primary-text;
}
.atwho-view .cur small {
color: $color-primary-text;
}
.atwho-view strong {
color: $color-main-text;
font-weight: normal;
}
.atwho-view .cur strong {
color: $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 $color-border;
cursor: pointer;
}
.atwho-view small {
font-size: smaller;
color: $color-main-text;
font-weight: normal;
}
19 changes: 16 additions & 3 deletions apps/comments/css/comments.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,30 @@
margin-right: 6px;
}

#commentsTabView .newCommentForm textarea {
#commentsTabView .newCommentForm div.message {
resize: none;
}

#commentsTabView .newCommentForm div.message:empty:before {
content: attr(data-placeholder);
color: grey;
}

#commentsTabView .comment {
position: relative;
margin-bottom: 30px;
}

#commentsTabView .comment .avatar {
#commentsTabView .comment .avatar,
.atwho-view-ul * .avatar{
width: 32px;
height: 32px;
line-height: 32px;
}

#commentsTabView .comment .message .avatar {
#commentsTabView .comment .message .avatar,
.atwho-view-ul * .avatar
{
display: inline-block;
}

Expand Down Expand Up @@ -112,11 +120,16 @@
}

#commentsTabView .comments li .message .avatar-name-wrapper,
.atwho-view-ul * .avatar-name-wrapper,
#commentsTabView .comment .authorRow {
position: relative;
cursor: pointer;
}

.atwho-view-ul * .avatar-name-wrapper {
white-space: nowrap;
}

#commentsTabView .comment .author,
#commentsTabView .comment .date {
opacity: .5;
Expand Down
Loading