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

Bring back multiline comments #1407

Merged
merged 4 commits into from
Oct 11, 2016
Merged

Bring back multiline comments #1407

merged 4 commits into from
Oct 11, 2016

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Sep 14, 2016

Fixes #942

Before:
before

After:
after

Which gives us multiline comments again! Whoohoo.
Only thing that we need to think about is how to handle the scroll bar (move to left?)

scroll

CC: @nickvergessen @nextcloud/designers @MorrisJobke

@rullzer rullzer added enhancement design Design, UI, UX, etc. 2. developing Work in progress labels Sep 14, 2016
@rullzer rullzer added this to the Nextcloud 11.0 milestone Sep 14, 2016
@mention-bot
Copy link

@rullzer, thanks for your PR! By analyzing the annotation information on this pull request, we identified @MorrisJobke, @nickvergessen and @jancborchardt to be potential reviewers

@eppfel
Copy link
Member

eppfel commented Sep 14, 2016

Scrollbar on the left would be super weird.
Why is the button inside the text field anyway? With single line comments, you were able to send via return, so maybe the arrow signals this behavior. But for multiline the action should be separate. (to show some status inside the field seems right)

@eppfel
Copy link
Member

eppfel commented Sep 14, 2016

I mean, the cancel button is there, too.

@@ -11,7 +11,8 @@
"backbone/backbone.js",
"es6-promise/dist/es6-promise.js",
"davclient.js/lib/client.js",
"clipboard/dist/clipboard.js"
"clipboard/dist/clipboard.js",
"autosize/dist/autosize.min.js"
Copy link
Member

Choose a reason for hiding this comment

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

tabs vs spaces

@rullzer
Copy link
Member Author

rullzer commented Sep 14, 2016

@eppfel well I was following #942 (comment)

But feel free to hijack to improve the design :)

@jancborchardt
Copy link
Member

@rullzer @eppfel this field should be autosized, meaning there should never ever be a scrollbar. :) Roeland, it seems you already added it?

@rullzer
Copy link
Member Author

rullzer commented Oct 3, 2016

Okidoki now fully autosizing

Review time!

@rullzer rullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 3, 2016
@MorrisJobke
Copy link
Member

PhantomJS 2.1.1 (Linux 0.0.0) OCA.Comments.CommentsTabView tests editing comments saves message and updates comment item when clicking save FAILED
    Expected Object({ message: 'New message' }) to equal Object({ message: 'modified message' }).
    /drone/src/github.com/nextcloud/server/apps/comments/tests/js/commentstabviewSpec.js:335:45

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
Copy link
Member Author

rullzer commented Oct 4, 2016

Fixed

@nickvergessen
Copy link
Member

Works 👍

@nickvergessen
Copy link
Member

What I just noticed, when you have leading or trailing newlines/whitespace they are displayed in the comment, until you do a page refresh.
But I guess that is not related and should be fixed in a second PR?

@rullzer
Copy link
Member Author

rullzer commented Oct 4, 2016

Yeah lets fix that separatly.

@MorrisJobke
Copy link
Member

I will review this - there are only some layout glitches between firefox and Chrome.

@MorrisJobke MorrisJobke self-assigned this Oct 5, 2016
@@ -25,7 +25,7 @@

#commentsTabView .newCommentForm .submit {
position: absolute;
top: 1px;
bottom: 1px;
Copy link
Member

Choose a reason for hiding this comment

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

With this it looks in Firefox good, but in Chrome not that good. Then I could change this to 5px to look in Chrome good, but in Firefox not centered. The reason is that the surrounding element (a <form>) is in Chrome not fitted around the textarrea but a bit longer at the bottom.

bildschirmfoto von 2016-10-05 17-32-41

@nextcloud/designers Any idea how we could solve this?

Copy link
Member

Choose a reason for hiding this comment

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

This is only 75 px in height in Firefox (and those are the 4 additional pixels that are needed in Chrome) 😞

Copy link
Member

Choose a reason for hiding this comment

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

This is how it looks without the change to bottom: 5px in chrome:
bildschirmfoto von 2016-10-05 17-34-59

Copy link
Member

Choose a reason for hiding this comment

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

Maybe @skjnldsv can help with this maybe? 😉

I failed too, for some reason the form height is calculated differently in FF/Chrome and therefore the absolute positioning looks different.

However, now that we want to bring back a dedicated login button in #1641 as the inline one caused confusion and here it looks also weird as soon as the comment is expanded to multiple lines, I thought about changing this form to use a dedicated button too. cc @jancborchardt

Copy link
Member

Choose a reason for hiding this comment

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

@ChristophWurst @MorrisJobke You need to put a display:block on the textarea. :)
It should do the trick and the form should now take the full textarea size.

Copy link
Member

Choose a reason for hiding this comment

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

firefox firefox
chrome chrome

@nickvergessen nickvergessen added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 6, 2016
@MorrisJobke MorrisJobke removed their assignment Oct 6, 2016
@ChristophWurst ChristophWurst self-assigned this Oct 10, 2016
@Espina2
Copy link
Contributor

Espina2 commented Oct 11, 2016

@ChristophWurst @jancborchardt @nextcloud/designers

What you guys think in making something like this. (Very quick mockup)
Its very similar to What I did for the news page.

comments 1
comments 2

@rullzer
Copy link
Member Author

rullzer commented Oct 11, 2016

@Espina2 o wow! I like it!
But lets first get this in and then change it :D

@MorrisJobke MorrisJobke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 11, 2016
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

👍

@MorrisJobke
Copy link
Member

But lets first get this in and then change it :D

Yep makes sense 👍 We should separate the different topics here.

@skjnldsv
Copy link
Member

Always forgot the approval doesn't work on reviews! 😑

LGTM 👍

@MorrisJobke
Copy link
Member

Tested and works 👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews help wanted labels Oct 11, 2016
@jancborchardt
Copy link
Member

jancborchardt commented Oct 11, 2016

@Espina2 very nice! Just two things:

  • We don’t need the extra cointainer around the comment, whitespace is enough.
  • Right now we sort comments with the newest up top, and the form is also on the top. This we should keep especially when we switch to introducing a timeline (combining activity and comments)
  • In general, the introduction of a timeline necessitates that the layout of the comments and activites is in line with each other: 📑 Sidebar: combine file Activity and Comments into »Activity« timeline tab (possibly also "Versions") #658 – maybe best work on a mockup for that and we can continue discussion there :) (cause the mockup from me there is already quite old and only crude)

@Espina2
Copy link
Contributor

Espina2 commented Oct 11, 2016

@jancborchardt Thanks dude.

Yup, we should discuss this in your issue. This is only a quick sketch for showing how can work visually not to much thinking in it. 👍

@MorrisJobke MorrisJobke merged commit 675230f into master Oct 11, 2016
@MorrisJobke MorrisJobke deleted the multiline_comments branch October 11, 2016 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish design Design, UI, UX, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants