MLH-Fellowship / prep-project-22.AUG.PREP.2

MLH Prep Project for Pod 22.JUL.AUG.2
https://prep-22-aug-prep-2-project.netlify.app/
MIT License
3 stars 13 forks source link

Website layout enhancement and code refactoring #48

Closed Ahmedsaed closed 2 years ago

Ahmedsaed commented 2 years ago

This PR contains bug fixes requested in issue #7 and other enhancements

Changes:

netlify[bot] commented 2 years ago

Deploy Preview for prep-22-aug-prep-2-project ready!

Name Link
Latest commit 6b5b253017e02bfa8c9edc1a5b39ade80f9c6ab3
Latest deploy log https://app.netlify.com/sites/prep-22-aug-prep-2-project/deploys/62f7fedce7f8b5000844ba8e
Deploy Preview https://deploy-preview-48--prep-22-aug-prep-2-project.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

farida52369 commented 2 years ago

Great work, Ahmed .. The refactor makes the code more reusable, and understandable (following the principles of OOP) But i have some observations:

Ahmedsaed commented 2 years ago

Thanks fareeda,

  • The Styling of get My location button is missing

I will fix the styling of the button (for some reason I forgot to add it while refactoring)

But I also have a comment, Why did you create another component just for one html line (A button). do you plan to expand it? image

  • The layout of card-container, I think it was more UX before .. when opening the app as a user there's a lot going on in this row not to mention the styling for the required items need to re-fix.

This PR contains improvements to the layout. The styling of the cards should be a new issue with a new PR

  • The background img doesn't cover all the stage

I can't reproduce this issue as the background is working fine in the preview image

farida52369 commented 2 years ago

Thanks Ahmed,

according to

  • Why did you create another component just for one html line (A button). do you plan to expand it?

I only solved the issue (Style the "Get My Location" button #42). It was another fellow who added the Component.

  • This PR contains improvements to the layout.

I think the layout is less UX.

  • The styling of the cards should be a new issue with a new PR.

I believe I've solved this issue before :)

  • I can't reproduce this issue as the background is working fine in the preview

I suppose it's hard coded in App.css

padding-top: 20px;
padding-bottom: 20px;

Screenshot from 2022-08-13 20-48-00

Screenshot from 2022-08-13 20-48-15

Ahmedsaed commented 2 years ago

I only solved the issue (Style the "Get My Location" button #42). It was another fellow who added the Component.

Oh, I guess I will contact the fellow who created the component then.

I think the layout is less UX.

I think it would be more helpful if you provide suggestions

I believe I've solved this issue before :)

Yes, I actually used it in the refactored version I managed to reproduce the problem by zooming out, it seems that the root element is not taking the full height of the body

Even though this issue has nothing to do with the changes in the PR, but I will try to fix it

I suppose it's hard coded in App.css

padding-top: 20px;
padding-bottom: 20px;

Nope, the padding is part of the solution to the issue (we should use padding instead of margin)

Ahmedsaed commented 2 years ago
  • The background img doesn't cover all the stage

Fixed it by adding

#root {
  height: 100vh;
}

To make the root element expand to the full height of body

, I will push the code in a moment image

Edit: it seems that it's not fixed yet

farida52369 commented 2 years ago
  • I think it would be more helpful if you provide suggestions

we can add

<SearchComponent />
<ResultsComponent />
<Map />
<RequiredItems />

as Icons for weather state will be added to ResultsComponent So it will give the user more UX to focus on only one component per row.

  • Fixed it by adding
    #root {
    height: 100vh;
    }

This solution seems to solve the problem but i still don't understand why when removing from App.css

padding-top: 20px;
padding-bottom: 20px; 

the map container looks this way :) Screenshot from 2022-08-13 22-09-04

Ahmedsaed commented 2 years ago

we can add

<SearchComponent />
<ResultsComponent />
<Map />
<RequiredItems />

as Icons for weather state will be added to ResultsComponent So it will give the user more UX to focus on only one component per row.

I don't really know, these design decisions should be taken be the whole team

For me, I think one card in a row is a waste of space and it would require you to scroll down to view more info

This solution seems to solve the problem but i still don't understand why when removing from App.css

padding-top: 20px;
padding-bottom: 20px; 

the map container looks this way :) Screenshot from 2022-08-13 22-09-04

This is a bug in the map, refresh the website or clear the cache and it should work fine

This bug might also happen while resizing the window, which is fine because users don't normally resize windows

Ahmedsaed commented 2 years ago

@farida52369

The background issue wasn't actually fixed for some scenarios but I managed to solve it by adding

background-attachment: fixed;

To to make the background fixed and prevent it from moving while scrolling

I will open a new PR with the fix

farida52369 commented 2 years ago

@Ahmedsaed

Great Work, Ahmed