-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Hooli-style Popup #123
Hooli-style Popup #123
Conversation
Hey! Congratulations with your PR! 😎😎😎 Please, be sure you haven't followed common mistakes. Also, be aware, that if you would silently ignore this recommendation, a mentor may think that you are still working on fixes. And your PR will not be reviewed. 😒 |
Thank you for providing chapter "Typical mistakes" for "popup task". It was helpful and I was able to get rid of all the unnecessary UI/LI tags. Also I have changed button MORE - now it becomes a button LESS when clicked. |
Please try to reach |
Hi! Last hour I have tried to solve this problem. The button is actually "more" button, so you can reach it on position between "always visible items" and "more items" items. And it indeed seems weird than you must press "tab" back to focus on the "Less" button. The "~" and "+" (as I understand, and as I tried) can reach only the next element in the document. If I add new checkbox button to the end of item list - it will nor reach upper element. |
Hi! As I understand, "alt" descriptions for icons in the popup menu are not necessary, so I've deleted them. I'm still waiting for advice about the "Less" button. Or I can remove it and hide the "More" button when pressing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,213 @@ | |||
/* base styles */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comments, they are not needed, code should be readable by its nature :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. My bad. I'll delete them.
@@ -0,0 +1,213 @@ | |||
/* base styles */ | |||
* { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
/* ===============Menu text items======================= */ | ||
.menu__item_text { | ||
/* display: block; */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all commented out code should be deleted
} | ||
.menu__item_checkbox_label { | ||
position: absolute; | ||
height: 1.715em; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read the articles (these or any others) and add at least a couple of rems, to the corresponding classes. Rem
is more used nowadays than em
<img | ||
class="menu__item_picture_img" | ||
src="./img/bell.png" | ||
alt="Alerts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this particular case, I believe that usage of the "alt" is reasonable: in case the picture is not loaded the user is still able to see picture caption which is aligned with advice from this article:
"Use the alt attribute for images that are used as more than decoration."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is reasonable, but the value is not correct
<nav class="menu__items"> | ||
<a class="menu__item_text menu__item" href="#">Mail</a> | ||
<a class="menu__item_text menu__item" href="#">Images</a> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not needed to leave spaces in HTML file
</head> | ||
<body> | ||
<header> | ||
<nav class="menu__items"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for plural naming better use list
word for example, because item and items looks pretty the same and you need to pay much attention to see the difference
<div class="popup__wrapper"> | ||
<div class="popup__items"> | ||
<a href="#" class="popup__item"> | ||
<div class="popup__item_image_container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can try to remove this div or text span and reduce the amount of tags, or wrap text and img in one div and use flex
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I use div-container-for-picture in purpose because all pictures have different sizes and this approach allows me to deal with it: regardless of the size of the picture, the menu item cells will be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can specify image width explicitly in corresponding class for images. You can leave it, but this is far from optimal
Please check the code adjusted according to your comments. I have corrected the focus on the popup button and deleted extra spaces and all comments. Also, I have changed class names. |
Please check the code adjusted according to your comments. I have removed "div-container-for-picture" and changed the "alt" value from "Alerts" to "Notifications". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the hover pointer effect on popup button and More button
font-size: 100%; | ||
line-height: 1; | ||
font-size: 14px; | ||
-ms-text-size-adjust: 100%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this property mean?
a { | ||
text-decoration: none; | ||
} | ||
ul li { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can leave just ul or li here
/> | ||
</a> | ||
<a class="menu__item_picture menu__item" href="#"> | ||
<img class="menu__item_picture_img" src="./img/logo.jpg" alt="User" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the "alt" value from "User" to "Profile".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text should explain where the link goes if the image is inside an <a> element
So, it should be "Go to Profile page"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make corresponding changes to alt
s
Added hover pointer and removed unnecessary rows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last steps ;)
} | ||
.menu__item_checkbox_label { | ||
position: absolute; | ||
height: 1.715em; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read the articles (these or any others) and add at least a couple of rems, to the corresponding classes. Rem
is more used nowadays than em
Hi! Thanks for your comments. Reworked as advised. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, please read the articles and add rems where you think it is NEEDED, not everywhere.
Hi Illia. Of course, I read the articles which you suggested to me. I also read other articles and watched some videos about units of measure. I clearly understand the differences in EM and REM size units. But I don't know the "best practice" of using them. I believe that the experience of use will come with time and with the number of implemented projects. |
Nice answer, fair enough ;) I guess it is time to go to the next tasks 🚀 |
Hooli-style Popup
Demo |
Code base
The code is submitted in a dedicated feature branch.
Only code files are submitted.
Please, review.