Skip to content

Port visual design of review page #155

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

Merged
merged 3 commits into from
Mar 2, 2018

Conversation

smacker
Copy link
Contributor

@smacker smacker commented Feb 22, 2018

Ricardo's changes to review page.

@ricardobaeta there are 2 problems:

  1. We use grid and on my screen there is not enough space for radio buttons
  2. You didn't add style for checked radio button, there is a rule in less file you have provided, but it's absolutely the same as unchecked.

screen shot 2018-02-22 at 12 00 37

@smacker smacker requested a review from bzz February 22, 2018 11:03
@ricardobaeta
Copy link
Contributor

ricardobaeta commented Feb 22, 2018

@smacker

We use grid and on my screen there is not enough space for radio buttons

I understand, but on the version without visual design it looked fine. I think we should really try to reflect the wireframes.

You didn't add style for checked radio button, there is a rule in less file you have provided, but it's absolutely the same as unchecked.

Are you able to sort this out? If you need any help just ask. It's a very tiny .less thing I believe.

@smacker
Copy link
Contributor Author

smacker commented Feb 22, 2018

  1. should I break grid? (what is the point of using it then)
  2. you need to give me css for checked radio element. I can't read your mind man 😆

@ricardobaeta
Copy link
Contributor

ricardobaeta commented Feb 22, 2018

@smacker

  1. should I break grid? (what is the point of using it then)

The point is to address a detail I told you before, that is the improvement of the right content block, particularly the similarity score visual wrapper width. So to say, the number of columns for both blocks on this row needs love. Also, please be so kind to consider the vertical alignment of each element on this row - this can be seen on the bottom example. It would be something along these lines.

grid

  1. you need to give me css for checked radio element. I can't read your mind man 😆

a) I wrote this code to set the background for checked & unchecked radio-buttons

&:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: @gray-dark;
    border-radius: 100%;
}

b) This code was written only to show everybody how the checked radio-button would look like. It's meant, from the beginning, to be removed and replaced by c). It was only provisory code, because the html element didn't have the checked attribute.

&:after {
    content: '';
    width: 8px;
    height: 8px;
    background: @brand-info;
    position: absolute;
    top: 7px;
    left: 7px;
    border-radius: 100%;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

c) This code was written to display a checked radio-button, relying on the assumption that the DOM would convey user behaviour, therefore adding the "checked" attribute on the selected radio-button. The code is in the Review.less - line 108 - and temporarily commented. This might be of interest http://react.tips/radio-buttons-in-reactjs/

&:checked:after {
    content: '';
    width: 8px;
    height: 8px;
    background: @brand-info;
    position: absolute;
    top: 7px;
    left: 7px;
    border-radius: 100%;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

I'm deeply thankful for your help!

@smacker
Copy link
Contributor Author

smacker commented Feb 23, 2018

@ricardobaeta

  1. The question was: what is the point to implement grid if we don't use it. (I specially checked all pages now. There is no even one place where we use grid. Design everywhere assumes flexible behavior like space-between or similar). Though the question is a bit out of scope of this PR. That's true.
  2. Wow. Could you please next time provide more detailed comments, please? It was not obvious I should remove code.

@smacker smacker force-pushed the review_visual_design branch from d5973b5 to 9d0052f Compare February 23, 2018 11:41
@smacker
Copy link
Contributor Author

smacker commented Feb 23, 2018

fixed radio button, removed grid from information row.

@bzz bzz requested a review from carlosms February 26, 2018 10:13
Copy link
Contributor

@carlosms carlosms left a comment

Choose a reason for hiding this comment

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

Code looks good.

I have a few comments on style/usability. Maybe these should be taken as feedback for @ricardobaeta more than @smacker ...

  • Having PREVIOUS in the dropdown to select the file pair ID feels a bit wrong. It's not only used to view previous ones.
  • The default height for the diff is so small that it looks very odd. As it is, it can't be used, and it looks more like a bug than a visual hint that something is there.
  • The columns for both tables (most similar and most dissimilar) are not aligned, they have slightly different widths.
  • Sometimes the diff does not take the full width of the page, and it looks kind of broken.
    a

<Col xs={4}>
<div className="review-results__stats">
Users Annotations: <b>{annotations.yes || 0} Similar</b> &{' '}
<b>{annotations.no || 0} Disimilar</b>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be dissimilar, typo in several places

@smacker
Copy link
Contributor Author

smacker commented Feb 26, 2018

how did you manage to break preview (not full width)? I need browser and steps.

@ricardobaeta
Copy link
Contributor

ricardobaeta commented Feb 26, 2018

@carlosms Thank you for the notice. I've explained before how this element should work. How it was on the wireframes, was that there should be a link - secondary aka finish - PREVIOUS, and then on the right NEXT with the dropdown. But giving it a second thought, I believe we should maintain the PREVIOUS dropdown element - only backwards - and then beside it on the right a "NEXT - style aka SKIP" button. What do you think @bzz ?

@carlosms
Copy link
Contributor

@smacker The diff width seems to be broken when the two file widths are small. For me, this happens always with ID 272 (using the initial deployment db in G Drive). Both Chrome and Firefox in linux.

@smacker
Copy link
Contributor Author

smacker commented Feb 26, 2018

@carlosms thanks! Bug with width is fixed.

@bzz
Copy link
Contributor

bzz commented Feb 28, 2018

@ricardobaeta on #155 (comment)

I think to avoid blocking this enhancement of the visual design, we should go on with the current state and file a separate issue (\w screenshot or design mock) for improvement.

What do you think?

@carlosms feedback has been addressed and is ready for another pass.

@ricardobaeta
Copy link
Contributor

@bzz I'll create an issue specifically for my comment changes. Let's unblock this, as you suggested :)

@carlosms
Copy link
Contributor

@bzz, @smacker, the typo is still there, Disimilar should be changed to Dissimilar (in several places)

Signed-off-by: Maxim Sukharev <[email protected]>
@smacker
Copy link
Contributor Author

smacker commented Feb 28, 2018

typo is fixed (though it's out of this PR scope)

@bzz
Copy link
Contributor

bzz commented Mar 1, 2018

@smacker seems like some tests on CI are failing now, could you please take a quick look?

@smacker
Copy link
Contributor Author

smacker commented Mar 1, 2018

@bzz restart helped

Copy link
Contributor

@dpordomingo dpordomingo left a comment

Choose a reason for hiding this comment

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

code LGTM,
I reviewed the discussion and it seems that technical issues were addressed, so I think we could unblock this PR:

  • @smacker could you rebase/squash/merge?
  • @ricardobaeta could you open an issue describing the things that weren't addressed and any other change that we should consider in the next iteration?

@smacker
Copy link
Contributor Author

smacker commented Mar 1, 2018

Let's wait for non-technical comments to be addressed (as I understand by creating a new issue).
Then I'll merge.

@ricardobaeta
Copy link
Contributor

@ricardobaeta could you open an issue describing the things that weren't addressed and any other change that we should consider in the next iteration?

I'll sure will @dpordomingo :)

@dpordomingo
Copy link
Contributor

about @smacker comment at #155 (comment)
Since Ricardo is already in charge of opening the issue listing pending things, we no longer need to wait in order to merge this PR, so it would be great if you could rebase/squash/merge

Thanks, all of you!!

@smacker
Copy link
Contributor Author

smacker commented Mar 2, 2018

I see the new issue was created. Merging! 🎉

@smacker smacker merged commit 76af4fd into src-d:master Mar 2, 2018
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.

5 participants