Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Several UI fixes #136

Merged
merged 25 commits into from
Aug 6, 2017
Merged

Several UI fixes #136

merged 25 commits into from
Aug 6, 2017

Conversation

DRSDavidSoft
Copy link
Contributor

According to the individual commits, minor fixes made to several parts of the UI.

1. Removed duplicated rule
2. Fixed scroll issue
Looks better than `overflow: hidden`.
This looks better to the eye, IMHO.
1. Background is set to `cover`, this will resize the background to fit the `div` while avoiding aspect ratio issues.
2. Added more space for the logout button.
1. Added more space for it
2. Changed the font size to match the UI overall font-size
The required extra space is achieved using the columns sass module.
1. The vertical padding matches the rest of sub elements' vertical padding
2. The horizontal padding now has enough space for the increment/decrement buttons to look better
This will differentiate the card from the rest of the post, making it easier to follow.
This will make the `x` icon go in the middle of close button
This will make the app login on hitting enter upon entering authentication information, instead of manually clicking on the login button.
1. Width
2. Button
Required for some positionings to work correctly
This will reflect the changes to the column sass module.
@hex2f
Copy link
Collaborator

hex2f commented Aug 2, 2017

@DRSDavidSoft are you using eslint to check linting before push?

@tahnik
Copy link
Owner

tahnik commented Aug 2, 2017

@DRSDavidSoft
Please check the log of Appvoyer or Travis.

Here is the error:
C:\projects\devrantron\app\src\main\js\components\auth\login.js
47:14 error Property should be placed on a new line react/jsx-first-prop-new-line

By the way, welcome to the project and thank you!

@tahnik tahnik self-assigned this Aug 2, 2017
@tahnik tahnik added the bug A software bug label Aug 2, 2017
Property should be placed on a new line
@DRSDavidSoft
Copy link
Contributor Author

@tahnik Great! Why using two CI services may I ask?

Trailing spaces are not allowed, apparently.
@tahnik
Copy link
Owner

tahnik commented Aug 2, 2017

@DRSDavidSoft Travis doesn't support Windows. We use AppVeyor for Windows and Travis for macOS, Linux

@DRSDavidSoft
Copy link
Contributor Author

@tahnik Can you review the PR?

@tahnik
Copy link
Owner

tahnik commented Aug 2, 2017

@DRSDavidSoft I did, check above

@tahnik
Copy link
Owner

tahnik commented Aug 2, 2017

@DRSDavidSoft have you found the reviews? Just making sure!

@@ -51,8 +52,8 @@
cursor: pointer
.logout
position: absolute
bottom: 5px
left: 10px
bottom: 10px
Copy link
Collaborator

Choose a reason for hiding this comment

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

change to 0.25rem

Copy link
Contributor Author

@DRSDavidSoft DRSDavidSoft Aug 3, 2017

Choose a reason for hiding this comment

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

Done. Initially I used px instead of rem because the previous commit also used it.
I suppose most of the units should be using rem here, right?

bottom: 5px
left: 10px
bottom: 10px
left: 1.5rem
Copy link
Collaborator

Choose a reason for hiding this comment

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

change to 0.5rem instead. Looks a bit odd when it's so high up.

Copy link
Contributor Author

@DRSDavidSoft DRSDavidSoft Aug 3, 2017

Choose a reason for hiding this comment

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

Are you referring to the left property? I set it to 0.5rem, but could you comment on the suitable values for both left and bottom properties?

This will prevent unwanted selection of the text in increment, decrement, score and comments icon.
@tahnik
Copy link
Owner

tahnik commented Aug 3, 2017

@DRSDavidSoft could you give me your email so I could add you in slack? It's easier to talk over there. Thanks

@tahnik
Copy link
Owner

tahnik commented Aug 3, 2017

@DRSDavidSoft I sent you the request. Please join.

@DRSDavidSoft
Copy link
Contributor Author

Thank you, @tahnik. I joined. What about this PR?

@DRSDavidSoft
Copy link
Contributor Author

The PR is conflicting with the edits. Could you review & merge it before more conflicts to show up?
Also what does the keydown event handler do?

@tahnik
Copy link
Owner

tahnik commented Aug 6, 2017

I resolved the conflicts. Can you please look at the reviews here: https://github.com/tahnik/devRantron/pull/136/files? I won't be able to merge this before you fix these stuff.

@DRSDavidSoft
Copy link
Contributor Author

@tahnik If you've reviewed/commented on my commits, I don't seem to find anything from you.
http://imgur.com/a/11CrO

@tahnik
Copy link
Owner

tahnik commented Aug 6, 2017

yeah, because I just started to push to your branch and fix those reviews @DRSDavidSoft

@@ -44,7 +44,12 @@ class Login extends Component {
<div className="auth_image" >
<img alt="devrant" src="./res/images/devrant_sidebar.png" />
</div>
<div className="auth_form" >
<div className="auth_form"
Copy link
Owner

Choose a reason for hiding this comment

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

We really need this, but this doesn't work for some reason. Can you check?

Edit: The reason is this is a div, not a form. So onSubmit won't be triggered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not change it to a form? It makes sense
Otherwise, we should write a handler on both fields to check e.which == 13 on keypress, which I don't recommend

Copy link
Owner

Choose a reason for hiding this comment

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

We have recently fixed it using keyDownEvent. so don't worry about this one.

@@ -2,7 +2,7 @@
font-size: 1.5rem
display: flex
background-color: #40415A
padding: 0.5rem
padding: 0.8rem 1rem
Copy link
Owner

Choose a reason for hiding this comment

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

@Dacexi can you review this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RekkyRek I'd be grateful if you did!

padding: 0rem 0rem 1rem 0rem
height: calc(100vh - 2.8rem - 1.5rem)
padding: 0 10px
height: 100vh
Copy link
Owner

Choose a reason for hiding this comment

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

Don't make it 100vh please. Keep some padding in the bottom. This can cause side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tahnik Tested with some other situations, I agree.

overflow-y: scroll
overflow-x: hidden
position: relative
overflow: auto
Copy link
Owner

Choose a reason for hiding this comment

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

Sometimes some rants cause overflow-x issues. It would be better to keep it the way it is.

Copy link
Contributor Author

@DRSDavidSoft DRSDavidSoft Aug 6, 2017

Choose a reason for hiding this comment

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

Nope, it's not. I think I know what you're referring to. Instead of overflow-x, this should be done:
https://stackoverflow.com/q/3058866/1454514

or better - https://stackoverflow.com/a/18706058/1454514

TL;DR: word-wrap: break-word; & word-break: break-all;

Copy link
Owner

Choose a reason for hiding this comment

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

You can add word-break: break-all; but it is still better to keep overflow-x hidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tahnik I hear you, but it causes problems with box-shadow. If it's going to be hidden, there should be enough padding for the box-shadow IMHO.

Copy link
Owner

Choose a reason for hiding this comment

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

@DRSDavidSoft break-all causes some other problems. For example, it also breaks words which look horrible. box-shadow looks fine now so have a look.

transform: translateZ(0)
-webkit-transform: translateZ(0)
padding: 0rem 0rem 1rem 0rem
height: calc(100vh - 2.8rem - 1.5rem)
padding: 0 10px
Copy link
Owner

Choose a reason for hiding this comment

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

This is causing the column not to align with the topbar. Is this what you intended? I don't think that looks nice. Maybe @Dacexi can confirm it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tahnik Can you post a screenshot from before and after please?

Copy link
Owner

Choose a reason for hiding this comment

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

I fixed it in another commit.

@@ -51,8 +52,8 @@
cursor: pointer
.logout
position: absolute
bottom: 5px
left: 10px
bottom: 10px
Copy link
Owner

Choose a reason for hiding this comment

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

This is causing the shadow in the back to misalign

@@ -41,7 +40,7 @@
width: 100%
.item_card.shadow
&:hover
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)
box-shadow: 0 2px 0px rgba(0, 0, 0, 0.19), 0 3px 4px rgba(0, 0, 0, 0.23)
Copy link
Owner

Choose a reason for hiding this comment

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

Don't think it's looking nice either. Looks more like a black border than a shadow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tahnik, OK, let's keep the previous one, but please make sure it has enough padding.

@@ -44,7 +44,13 @@ class Login extends Component {
<div className="auth_image" >
<img alt="devrant" src="./res/images/devrant_sidebar.png" />
</div>
<div className="auth_form" >
<div
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this as this is not working :)

Copy link
Contributor Author

@DRSDavidSoft DRSDavidSoft Aug 6, 2017

Choose a reason for hiding this comment

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

Can .auth_form be an actual <form>? :)

@tahnik
Copy link
Owner

tahnik commented Aug 6, 2017

fuck me sorry. I forgot to request the changes

@tahnik
Copy link
Owner

tahnik commented Aug 6, 2017

can you see the reviews now @DRSDavidSoft

@tahnik
Copy link
Owner

tahnik commented Aug 6, 2017

@DRSDavidSoft does everything looks good to you now?

@DRSDavidSoft
Copy link
Contributor Author

@tahnik Seems good! I was wondering why I didn't get any reviews from you. Let's merge it :)

@tahnik tahnik merged commit d124f29 into tahnik:master Aug 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A software bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants