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

Atualizei o layout da página inicial e ajustei o CSS #5806

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

andrei-pcsantos
Copy link

@andrei-pcsantos andrei-pcsantos commented Dec 11, 2024

https://andrei-pcsantos.github.io/layout_moyo-header/
https://andrei-pcsantos.github.io/layout_moyo-header/report/html_report/

Header height is set in 1 place (for the links)
Content is vertically centered (for any header height)
CSS is used to show all letters in Uppercase (don't type them in HTML)
Logo is an image wrapped with a link
CSS Variable is used for a blue color
Pseudo-element is used for a blue line below the active link
Code follows all the Code Style Rules ❗️

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Thank you for your hard work on this project! 😊 While your code meets many of the task requirements, there are a few critical issues that need to be addressed before we can approve the pull request:

  1. CSS Variable for Blue Color: The task requires using a CSS variable for the blue color used in the active link and hover states. Currently, the color #00acdc is hardcoded in the CSS. This is important for maintainability and flexibility.

  2. Fallback Fonts: It's crucial to include a more appropriate fallback font like sans-serif instead of just serif to ensure better cross-browser compatibility.

  3. HTML alt Attribute: The alt attribute for the logo image should be more descriptive than just "logo" to improve accessibility.

  4. CSS Selector Usage: Avoid using tag names like nav and ul for styling, except for html and body, to prevent unintended styling issues.

  5. Base Font Size: The base font size is set to 12px, which might be too small for readability on some devices. Consider using a relative unit like 'em' or 'rem'.

  6. href Attribute: Ensure that the href attributes are correctly set or commented if they are placeholders.

  7. Accessibility Enhancements: Consider adding an aria-label to the <a> tag for better accessibility, especially if the logo is the only content inside the link.

Please address these issues to ensure full compliance with the task requirements. Once these changes are made, your code will be in great shape! Keep up the great work! 🌟

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/style.css Outdated Show resolved Hide resolved
src/style.css Outdated
@@ -2,2 +1,56 @@
html {
font-family: Roboto, serif;
font-size: 12px;

Choose a reason for hiding this comment

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

The base font size is set to 12px, which might be too small for readability on some devices. Consider using a relative unit like 'em' or 'rem' for better scalability and accessibility.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Sorry, the pull request review was unsuccessful for the following reasons:

Warning

No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.

Copy link

@pedro-ruas pedro-ruas left a comment

Choose a reason for hiding this comment

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

There are a few changes that need to be addressed, the AI mentor has pointed some, and I have highlighted the most important ones.
Besides that, you should also deploy the project using npm run deploy and add the links for both the tests results and the page itself in your pull request.

src/index.html Outdated
/>
</a>
<nav class="navigation">
<ul class="navigation__list">

Choose a reason for hiding this comment

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

Correct naming would be: navigation__list list, so it acts as an Element list from the Block navigation, but at the same time as a Block list

src/index.html Outdated
</li>
<li class="list__item">
<a
class="link"

Choose a reason for hiding this comment

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

And here the correct class would be list__link

src/style.css Outdated
@@ -1,3 +1,56 @@
body {
html {
font-family: Roboto, serif;

Choose a reason for hiding this comment

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

Actually, Robot is a "sans-serif" font, so the fallback would be sans-serif not serif

src/style.css Outdated
}
body,
nav,
ul {

Choose a reason for hiding this comment

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

Not good to add nav and ul here.
If what you are trying to accomplish here is to reset the styling for everything, which is ok, you could use *, just for this purpose.
If the styling is meant only for the nav and ul, you should add these in their classes, not in the tag itself

src/style.css Outdated
content: '';
width: 37px;
height: 4px;
background-color: #00acdc;

Choose a reason for hiding this comment

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

This color should be a variable, it is explicitly said in the checklist

src/style.css Show resolved Hide resolved
Copy link

@pedro-ruas pedro-ruas left a comment

Choose a reason for hiding this comment

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

There are some changes that need to be addressed, and you should fix the test report link, as I can't see the results

src/index.html Outdated
data-qa="hover"
>
<a
class="list__link la__link"

Choose a reason for hiding this comment

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

There is no need for this second class la__link, this link works the same as the others, but it has another property called data-qa="hover"

src/style.css Outdated
.list__link:hover {
color: var(--primary-color);
text-decoration: underline;
text-decoration-thickness: 2px;

Choose a reason for hiding this comment

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

I truly believe that the hovered links should NOT have underline

src/style.css Outdated

.is-active::after {
content: '';
width: 37px;

Choose a reason for hiding this comment

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

We never use broken numbers like this. This after should have 100% width, not a fixed value

src/style.css Outdated
position: absolute;
bottom: 0;
left: 0;
right: 0;

Choose a reason for hiding this comment

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

How can it be both left 0 and right 0?
Remove the second one

}

.list__item {
text-transform: uppercase;

Choose a reason for hiding this comment

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

This should contain position: relative and have the full height of the header

Copy link

@joaorpereira joaorpereira left a comment

Choose a reason for hiding this comment

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

Please update the following steps inside the readme file:

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)

href="./style.css"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Moyo Header</title>

Choose a reason for hiding this comment

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

add roboto font:

    <link
      rel="preconnect"
      href="https://fonts.googleapis.com"
    />
    <link
      rel="preconnect"
      href="https://fonts.gstatic.com"
      crossorigin="attr-req-value"
    />
    <link
      href="https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap"
      rel="stylesheet"
    />

src/style.css Outdated
html {
font-family: Roboto, Arial, Helvetica, sans-serif;
font-size: 0.75rem;
font-weight: 500;

Choose a reason for hiding this comment

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

remove: font-weight: 500;

margin: 0;
padding: 0;

Choose a reason for hiding this comment

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

padding: 0;
}

.header {

Choose a reason for hiding this comment

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

.header {
  padding: 0 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

list-style-type: none;
}

.list__item {

Choose a reason for hiding this comment

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

.list__item {
text-decoration: none;
font-weight: 500;
font-size: 12px;
color: #000;
text-transform: uppercase;
height: 60px;
line-height: 60px;
display: inline-block;
}


.is-active {
color: var(--primary-color);
position: relative;

Choose a reason for hiding this comment

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

.is-active {
  color: var(--primary-color);
  position: relative;
  font-weight: 500;
}

src/style.css Outdated
line-height: 60px;
text-decoration: none;
color: #000;
font-weight: bold;

Choose a reason for hiding this comment

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

font-weight: 500; instead of font-weight: bold;

Copy link

@pedro-ruas pedro-ruas left a comment

Choose a reason for hiding this comment

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

I see you fixed most of it, but I still cannot see the tests results, your link is broken. However, I see github has approved the tests, so I will allow it this time

@andrei-pcsantos
Copy link
Author

andrei-pcsantos commented Dec 20, 2024 via email

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.

4 participants