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

Solution #4499

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

Solution #4499

wants to merge 6 commits into from

Conversation

cassiaqueiroz
Copy link

  • DEMO LINK

  • TEST REPORT LINK

  • Icon implemented using background-image CSS property

  • Inputs are written inside of 'form' tag with correctly passed attributes

  • All Typical Mistakes from BEM lesson theory are checked.

  • 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.

Hey there! 👋 It looks like there are a few areas that need a bit of tweaking to align with best practices and maintain consistency in your code. Remember, keeping your code well-organized and consistent makes it easier to read and maintain for you and others in the future. Keep up the great work, and with some minor adjustments, your code will be top-notch! 🚀

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

src/index.html Outdated Show resolved Hide resolved
src/index.html Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
src/style.css Show resolved Hide resolved
padding: 0;
}

.search-bar {

Choose a reason for hiding this comment

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

Consider adding a bottom margin to the .search-bar instead of a top margin to be consistent with your margins, as per the checklist item 'Be consistent with your margins (Add only top or bottom, but not both)'.

text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.search-bar__input--small {

Choose a reason for hiding this comment

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

The .search-bar__input--small class correctly overrides the necessary properties for the smaller search bar variant, maintaining consistency in the design. However, make sure that the font-weight: 400; is necessary here, as the normal font weight is usually the default and might not need to be specified unless it's overriding a previous setting.

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.

Great job on your HTML structure! 👍 It's mostly well-constructed with proper semantic elements and attributes. Just a few minor formatting issues to iron out for the future. Keep up the good work and always aim for clean, maintainable code! Remember, attention to detail can make a big difference! 😊

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

Comment on lines +25 to +30
<input
class="search-bar__input"
data-qa="keypress"
type="text"
placeholder="Try “Los Angeles”"
/>

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. Since the input element has more than two attributes, each attribute should start on a new line with 2-space indentation relative to the tag.

Comment on lines +36 to +39
<input
class="search-bar__input search-bar__input--small"
type="text"
placeholder="Try “Los Angeles”"

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. Since the input element has more than two attributes, each attribute should start on a new line with 2-space indentation relative to the tag.

Comment on lines +1 to +10
@font-face {
font-family: Avenir;
src: url('fonts/Avenir.ttc');
font-weight: 300;
}

@font-face {
font-family: Avenir;
src: url('fonts/Avenir.ttc');
font-weight: bold;

Choose a reason for hiding this comment

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

Consider adding a fallback font family in your @font-face rule to ensure text remains visible when the custom font is loading or if it fails to load. For example, you could modify the font-family property to include a generic font family like sans-serif as a backup.

}

body {
padding: 0;

Choose a reason for hiding this comment

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

It's a good practice to set margin: 0; along with padding: 0; on the body element to reset any default margins provided by the browser.

}

.search-bar {
margin-top: 20px;

Choose a reason for hiding this comment

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

Be consistent with your margins. Since you're adding a margin to the top, ensure that you're not adding margin to the bottom of any elements within .search-bar to avoid potential margin collapse issues.

background-position: 25px;
width: 100%;
height: var(--search-bar-height);
padding-left: 62px;

Choose a reason for hiding this comment

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

Avoid fixing the padding size. Instead, consider using relative units or a variable if the design allows for flexibility. This can make the design more responsive and easier to maintain.

@cassiaqueiroz cassiaqueiroz marked this pull request as draft September 30, 2024 05:49
@cassiaqueiroz cassiaqueiroz marked this pull request as ready for review September 30, 2024 06:00
Copy link
Author

@cassiaqueiroz cassiaqueiroz left a comment

Choose a reason for hiding this comment

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

I modified input indentation and added sans-serif to the font-face.

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.

Great job on your Pull Request! 🌟 There are some minor issues related to code style and best practices, like consistent margins, avoiding tag selectors, using semantic tags, and proper attribute formatting. However, these don't significantly impact the functionality or security of your code. Keep these tips in mind for future projects to make your code even better! 💻✨

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

Comment on lines +21 to +30
<form
class="search-bar"
data-qa="big"
>
<input
class="search-bar__input"
data-qa="keypress"
type="text"
placeholder="Try “Los Angeles”"
/>

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. Since the <input> element on lines 25-30 has more than two attributes, each attribute should start on a new line with 2-space indentation relative to the tag.

Comment on lines +32 to +40
<form
class="search-bar"
data-qa="small"
>
<input
class="search-bar__input search-bar__input--small"
type="text"
placeholder="Try “Los Angeles”"
/>

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. Since the <input> element on lines 36-40 has more than two attributes, each attribute should start on a new line with 2-space indentation relative to the tag.

class="search-bar__input"
data-qa="keypress"
type="text"
placeholder="Try “Los Angeles”"

Choose a reason for hiding this comment

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

Use semantic tags where possible. Consider wrapping the <input> elements in a semantic tag like <section> or <div> to indicate a block of related content.

Comment on lines +29 to +31
body {
padding: 0;
}

Choose a reason for hiding this comment

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

Don't use tag names for styling (except html and body). Instead of setting padding directly on the body, use a class to style these properties.

Comment on lines +33 to +35
.search-bar {
margin-top: 20px;
}

Choose a reason for hiding this comment

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

Be consistent with your margins. It's recommended to add only top or bottom margins, but not both, to avoid potential margin collapse issues.

background-repeat: no-repeat;
background-size: var(--search-icon-size);
background-position: 25px;
width: 100%;

Choose a reason for hiding this comment

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

Don't fix container size (if there is no such a requirement). The width of the .search-bar__input is set to 100%, which is good as it allows the container to be flexible. However, ensure that this is not causing any overflow or accidental scrollbar, especially when padding or borders are added.

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.

2 participants