Skip to content

fix tree detail height#62

Merged
mmaelicke merged 2 commits into
mainfrom
fix-detail-height
Apr 14, 2023
Merged

fix tree detail height#62
mmaelicke merged 2 commits into
mainfrom
fix-detail-height

Conversation

@mmaelicke
Copy link
Copy Markdown
Member

fixes #58

I tested for Desktop, Mobile and iPad Air (in Chrome) to fix the width of the Tree Detail card.

I am not sure, what exactly the problem is on mobile devices. I will add a commented review to explain my changes.

Comment thread src/pages/DesktopPage.tsx
<IonCard
style={{
position: "absolute",
margin: "0px",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The card has a margin, that was screwing up on iPads due to different values in relation to current viewport size

Comment thread src/pages/DesktopPage.tsx
margin: "0px",
top: 60,
left: 12,
left: 20,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is the absolute displacement of the Buttons above the details

Comment thread src/pages/DesktopPage.tsx
width: "400px",
height: "90%",
maxWidth: "80%",
height: "calc(100% - 60px - 20px)",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the height is now calculated for the current height minus the fixed offsets

Comment thread src/pages/DesktopPage.tsx
// width: "33vw",
width: "400px",
height: "90%",
maxWidth: "80%",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Makes the card slightly smaller on iPad to not overlay the position button on the map

@mmaelicke mmaelicke requested a review from JesJehle April 9, 2023 06:25
@JesJehle
Copy link
Copy Markdown
Collaborator

JesJehle commented Apr 9, 2023

For iPad, the card is still too high (Brave)
image

@mmaelicke
Copy link
Copy Markdown
Member Author

For iPad, the card is still too high (Brave)

Can you also try chrome or safari? On both, a iPad screen size works for me, or did you try an actual iPad?

Copy link
Copy Markdown
Collaborator

@JesJehle JesJehle left a comment

Choose a reason for hiding this comment

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

It's working now. No idea why ...

@mmaelicke mmaelicke merged commit cb10527 into main Apr 14, 2023
@mmaelicke mmaelicke deleted the fix-detail-height branch April 14, 2023 14:01
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.

Set height of components dynamic based on different devices

2 participants