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

Display commit and timestamp information about the file in the file view #606

Merged
merged 3 commits into from
Sep 13, 2019

Conversation

ciyer
Copy link
Contributor

@ciyer ciyer commented Sep 11, 2019

Commit hash, with link to commit in github, commit message, commit author, and commit date/time has been added to the display.

It looks like

image

Running on https://sekhartest.dev.renku.ch/ for testing.

Fix #487.

@ciyer ciyer force-pushed the 487-file-view-info branch 2 times, most recently from 7a37241 to 44d8614 Compare September 12, 2019 14:26
@ciyer ciyer force-pushed the 487-file-view-info branch 2 times, most recently from a3b7108 to 7146f77 Compare September 12, 2019 15:08
@ciyer ciyer marked this pull request as ready for review September 13, 2019 08:33
@ciyer ciyer requested a review from a team as a code owner September 13, 2019 08:33
@ciyer ciyer changed the title WIP: Display commit and timestamp information about the file in the file view Display commit and timestamp information about the file in the file view Sep 13, 2019
@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2019

@cchoirat If you get a chance to try this out, we would be interested in your feedback.

@cchoirat
Copy link

is it on dev?

@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2019

Not yet, but you can test on https://sekhartest.dev.renku.ch/

@vfried
Copy link
Contributor

vfried commented Sep 13, 2019

I like it but i think for smaller screens it might be taking too much space... I think we could do something like this...

image

For this i made a small change:
I made the font small, replaced the div for a span and set the span into the right (float-right)... i didn't checked larger commit messages but i think we could just cut the string.
image

Copy link
Contributor

@vfried vfried left a comment

Choose a reason for hiding this comment

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

I left a message with suggested changes, if you don't think they are right you can dismiss them.

@lorenzo-cavazzi
Copy link
Member

@vfried I think floating right doesn't help in a small screen unless the commit message is very short.

Screenshot from 2019-09-13 14-41-06

I kind of prefer the 2 lines version. I would probably cut the commit message chars at a given number (60? 100?) to avoid long commit messages taking multiple lines.

@vfried
Copy link
Contributor

vfried commented Sep 13, 2019

What I meant with that is that it that will give a bit more of room for code, since it would only be one line instead of 2... the throw right doesn't solve the long commit messages problem, and that's why i mention above that we need to crop it.

@lorenzo-cavazzi
Copy link
Member

Ops I see only now that you mentioned cutting down long commit messages, guess the comment was edited but I didn't refresh the page 😅

@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2019

I'm using the "title" that comes with the commit information from gitlab. This is restricted to some number of characters (but I need to look at the code to see how many).

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Look good, I found only a small issue related to the graphButton that is not rendered anymore (the rightmost in the following screen taken on dev)

Screenshot from 2019-09-13 15-13-43

src/file/File.present.js Show resolved Hide resolved
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Lgtm now 👍
I tried a long commit message and it seems to go into the UI untouched. I would address this in the current PR, but feel free to merge it if you think the current behavior is acceptable.

https://sekhartest.dev.renku.ch/projects/lorenzo.cavazzi.tech/zurich-bikes-tutorial/files/blob/aaa.txt
Screenshot from 2019-09-13 15-41-09

@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2019

I see. The title field took that commit message up to the first \n. I've limited it to 120 chars now.

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Works as advertized 🎉

@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2019

With some flexbox magic fairy dust, I have it working as Virginia suggested, if there is space:

image

And otherwise, as before:

image

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

lgtm

@vfried
Copy link
Contributor

vfried commented Sep 13, 2019

Well done, looks good!

@ciyer ciyer merged commit 72cf98c into master Sep 13, 2019
@ciyer ciyer deleted the 487-file-view-info branch September 13, 2019 14:46
@ciyer ciyer added this to the 0.7.0 milestone Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commit hash and timestamp in file browser
5 participants