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

Conversation

@blizzz
Member

blizzz commented Oct 27, 2017

Follow up to #6779, both backend and gui, for #2443

I also did a quick demo video demo video

  • Type @ and a char to start auto completion for a user
  • Mentiones are rendered just like as we use avatar + displayname everywhere
  • works also when editing users
  • user shared with and commented are sorted on top (given their are part of the result set)
  • it's themed!
  • known issue on FF: to remove a mention, it must be marked first. Apparently a browser bug. On Chromium, backspace works fine.

Please test and review

blizzz added some commits Aug 30, 2017

AutoCompletion backend
* introduce a Controller for requests
* introduce result sorting mechanism
* extend Comments to retrieve commentors (actors) in a tree
* add commenters sorter
* add share recipients sorter

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
split walking the tree from operating on it
so walking it is reusable

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
ensure that sorting is stable
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fix class name in info.xml
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
add At.js and dependencies
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
setup atwho autocomplete
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
contenteditable divs should look like textareas
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
turn textarea to contenteditable div
we will need it for nice formatting of the mentioned user

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
when writing a comment, render mentions as they'd appear anywhere
i.e. avatar with displaymenu and contactsmenu-popover

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
convert mentions after save to the plain format we use
also ensures proper rendering, even of edited comments

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fix contactsmenu-popup
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fix unstable comment order
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
enable autocomplete when editing comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
avoid unnecessary recursion
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
add search parameter to autocomplete controller
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
add config parameter sample
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
autocomplete on demand
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fix sorting
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apply our theming
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

blizzz added some commits Oct 27, 2017

avatar css fixes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
configurable amount of autocomplete results in comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Oct 27, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@52b679a). Click here to learn what that means.
The diff coverage is 58.15%.

@@            Coverage Diff            @@
##             master    #6982   +/-   ##
=========================================
  Coverage          ?   50.62%           
  Complexity        ?    24289           
=========================================
  Files             ?     1576           
  Lines             ?    92882           
  Branches          ?     1358           
=========================================
  Hits              ?    47022           
  Misses            ?    45860           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
lib/private/Share20/Manager.php 86.65% <ø> (ø) 234 <0> (?)
core/routes.php 0% <ø> (ø) 0 <0> (?)
apps/user_ldap/lib/Connection.php 57.55% <ø> (ø) 118 <0> (?)
...iles_sharing/composer/composer/autoload_static.php 0% <ø> (ø) 1 <0> (?)
config/config.sample.php 0% <ø> (ø) 0 <0> (?)
...pps/comments/composer/composer/autoload_static.php 0% <ø> (ø) 1 <0> (?)
apps/user_ldap/lib/Access.php 18.18% <0%> (ø) 304 <0> (?)
...s/comments/composer/composer/autoload_classmap.php 0% <0%> (ø) 0 <0> (?)
lib/private/legacy/app.php 54.18% <0%> (ø) 221 <0> (?)
apps/comments/appinfo/app.php 13.63% <0%> (ø) 0 <0> (?)
... and 11 more

codecov bot commented Oct 27, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@52b679a). Click here to learn what that means.
The diff coverage is 58.15%.

@@            Coverage Diff            @@
##             master    #6982   +/-   ##
=========================================
  Coverage          ?   50.62%           
  Complexity        ?    24289           
=========================================
  Files             ?     1576           
  Lines             ?    92882           
  Branches          ?     1358           
=========================================
  Hits              ?    47022           
  Misses            ?    45860           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
lib/private/Share20/Manager.php 86.65% <ø> (ø) 234 <0> (?)
core/routes.php 0% <ø> (ø) 0 <0> (?)
apps/user_ldap/lib/Connection.php 57.55% <ø> (ø) 118 <0> (?)
...iles_sharing/composer/composer/autoload_static.php 0% <ø> (ø) 1 <0> (?)
config/config.sample.php 0% <ø> (ø) 0 <0> (?)
...pps/comments/composer/composer/autoload_static.php 0% <ø> (ø) 1 <0> (?)
apps/user_ldap/lib/Access.php 18.18% <0%> (ø) 304 <0> (?)
...s/comments/composer/composer/autoload_classmap.php 0% <0%> (ø) 0 <0> (?)
lib/private/legacy/app.php 54.18% <0%> (ø) 221 <0> (?)
apps/comments/appinfo/app.php 13.63% <0%> (ø) 0 <0> (?)
... and 11 more

blizzz added some commits Oct 27, 2017

fix sharerecipientssorter tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
add acceptance tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
preserve line breaks
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
fix comment sorter
background: we have a flat hierarchy of comments, not a tree. therefore we
can also remove again the unnecessary additions.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@jancborchardt

Looks nice from the demo video! I’d say further fixes should be done in follow-ups cause this is too big already. :)

@nickvergessen

This comment has been minimized.

Show comment
Hide comment
@nickvergessen

nickvergessen Oct 31, 2017

Member

Should only ship the minified js file, instead of the examples and other unneeded stuff.

Member

nickvergessen commented Oct 31, 2017

Should only ship the minified js file, instead of the examples and other unneeded stuff.

blizzz added some commits Oct 31, 2017

only ship minimized js files
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
simplify registration of manager in server container
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
remove more vendor-imported files that aren't necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@nickvergessen

This comment has been minimized.

Show comment
Hide comment
@nickvergessen

nickvergessen Oct 31, 2017

Member
  1. If you match the full user id with @test1 the user is not suggested anymore, but @test brings them up
  2. The avatar is not rendered anymore after you clicked/selected one of the options.
Member

nickvergessen commented Oct 31, 2017

  1. If you match the full user id with @test1 the user is not suggested anymore, but @test brings them up
  2. The avatar is not rendered anymore after you clicked/selected one of the options.

blizzz added some commits Oct 31, 2017

fix avatar loading for generic placeholders
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
meanwhile we can have exact matches. also show those.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz

This comment has been minimized.

Show comment
Hide comment
@blizzz

blizzz Oct 31, 2017

Member

@nickvergessen great testing 👍 fixed with recent commits

Member

blizzz commented Oct 31, 2017

@nickvergessen great testing 👍 fixed with recent commits

@rullzer

Awesome

blizzz added some commits Nov 1, 2017

adjust jsunit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
update autoloader
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

@blizzz blizzz merged commit db48575 into master Nov 1, 2017

2 of 4 checks passed

codecov/patch No report found to compare against
Details
codecov/project No report found to compare against
Details
Scrutinizer 6 new issues, 30 updated code elements
Details
continuous-integration/drone/pr the build was successful
Details

@blizzz blizzz deleted the autocomplete-gui branch Nov 1, 2017

@blizzz

This comment has been minimized.

Show comment
Hide comment
@blizzz

blizzz Nov 1, 2017

Member

🍻

Member

blizzz commented Nov 1, 2017

🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment