Skip to content

Zaw PR#6

Open
LucyMac wants to merge 39 commits into
codecaravan-hq:mainfrom
zkhing:main
Open

Zaw PR#6
LucyMac wants to merge 39 commits into
codecaravan-hq:mainfrom
zkhing:main

Conversation

@LucyMac

@LucyMac LucyMac commented Jan 28, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/index.css Outdated
.teapot-img,
.flowers-img {
width: 100%;
height: auto;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This needs to be height: 100% for the image to fill the whole space allocated.

The parent of this image, wiseleaf-img1, is correctly set to the right section of the grid, but the image is not filling that space (it's not filling its parent).

Set the height to 100% and also remove the margin-bottom on the parent - it also interferes with how the image fills the space.

Comment thread src/index.css Outdated

/* ----------Media query section starts here-------- */
/* ----------- media query for tablet------*/
@media only screen and (min-width: 400px) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a little early to start tablet. Small tablets start around 600px wide, but many codebases start tablet designs from 768px wide (the width of early ipad versions)

Comment thread src/App.jsx Outdated
Comment on lines +27 to +29
<footer>
<Footer />
</footer>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead of doing this, just use the footer HTML tag in your <Footer /> component.
Then, you don't need to repeat it twice here. So it should just say:

<Footer />

Comment thread src/pages/Home.jsx Outdated

function Home() {
return (
<div>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This div is not necessary.You can use the empty Fragment tags <> and </> to avoid the React warning.
These will satisfy React and remove the warning, but they will disappear in the final render.

Comment thread src/index.css Outdated

.main-div {
display: flex;
flex-direction: row;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line is what's causing your Reservation page to be too wide. You are saying "put all the elements next to each other in a row" but you aren't controlling how wide these elements are, so they just take up as much space as they want - and that adds up to more than 100%.

Change to this flex-direction: column and you will already be much closer. Then you can tweak the position of the large leaf icon using some tricks like negative margin-top to push it up a bit (not great practice but in this case it's just a little help and could be worth it)

@LucyMac LucyMac left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great work @zkhing! You've accomplished some really complex layouts and well done on the carousel! 🙌🏼

Try to split your CSS up more so it's not all in index.css. The minimum should be to split it by page (Home.css, Reservation.css, Menu.css). For common components like Header and Footer, keep the CSS inside the component (Header.css, Footer.css etc)

🤩

@zkhing

zkhing commented Feb 1, 2023

Copy link
Copy Markdown

Great work @zkhing! You've accomplished some really complex layouts and well done on the carousel! 🙌🏼

Try to split your CSS up more so it's not all in index.css. The minimum should be to split it by page (Home.css, Reservation.css, Menu.css). For common components like Header and Footer, keep the CSS inside the component (Header.css, Footer.css etc)

star_struck

Thank you so much for feedback @LucyMac. I have made the changes accordingly :)

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