-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix(frontend): The "Log Out" button can't be reached on the sidebar in landscape mode [Mobile] tm-567 #686
Open
GEOFARL
wants to merge
18
commits into
main
Choose a base branch
from
567-fix-log-out-btn-cant-be-reached
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
575c12e
fix(frontend): logout button in sidebar tm-567
GEOFARL feae85c
fix(frontend): inconsistency with pwa sidebar tm-567
GEOFARL d708111
chore: remove changes from package lock tm-567
GEOFARL aadf401
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL bf1b390
chore(frontend): adjust sidebar layout to account for management btn …
GEOFARL c225d24
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL d83356a
fix(frontend): add overflow to sidebar tm-567
GEOFARL 84a919f
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL 95d7cfa
fix(frontend): jumping logo tm-567
GEOFARL 4da9367
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL 3341f88
fix(frontend): jumping elements tm-567
GEOFARL f375e3b
fix(frontend): remove horizontal jump tm-567
GEOFARL d04af1e
chore(frontend): combine 3 properties into 1 tm-567
GEOFARL e0ed356
fix(frontend): micro jump tm-567
GEOFARL db3d323
fix(frontend): pwa scroll problem tm-567
GEOFARL d7568b6
refactor(frontend): remove duplicate burger button tm-567
GEOFARL 76dab12
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL 517459d
Merge branch 'main' into 567-fix-log-out-btn-cant-be-reached
GEOFARL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,11 @@ | |
left: 0; | ||
z-index: 1000; | ||
} | ||
|
||
.fixed { | ||
position: fixed; | ||
} | ||
|
||
.absolute { | ||
position: absolute; | ||
} |
1 change: 1 addition & 0 deletions
1
apps/frontend/src/libs/components/sidebar/libs/constants/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { SMALL_WIDTH_BREAKPOINT } from "./small-width-breakpoint.constant.js"; |
3 changes: 3 additions & 0 deletions
3
apps/frontend/src/libs/components/sidebar/libs/constants/small-width-breakpoint.constant.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const SMALL_WIDTH_BREAKPOINT = 480; | ||
|
||
export { SMALL_WIDTH_BREAKPOINT }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -7,9 +7,10 @@ | |||||
flex-direction: column; | ||||||
height: 100%; | ||||||
padding: 19px; | ||||||
padding-right: 10px; | ||||||
overflow: hidden; | ||||||
background-color: var(--color-menu); | ||||||
transition: width 0.3s ease; | ||||||
transition: 0.3s ease; | ||||||
} | ||||||
|
||||||
.menu { | ||||||
|
@@ -98,7 +99,8 @@ | |||||
display: flex; | ||||||
flex: 1; | ||||||
flex-direction: column; | ||||||
overflow: hidden scroll; | ||||||
padding-right: 9px; | ||||||
overflow: hidden; | ||||||
} | ||||||
|
||||||
@media screen and (--large-screen) { | ||||||
|
@@ -168,6 +170,10 @@ | |||||
} | ||||||
} | ||||||
|
||||||
.absolute { | ||||||
position: absolute; | ||||||
} | ||||||
|
||||||
@media screen and (--small-screen) { | ||||||
.sidebar.close { | ||||||
width: 270px; | ||||||
|
@@ -184,6 +190,26 @@ | |||||
left: 33px; | ||||||
z-index: var(--z-index-low); | ||||||
color: var(--color-button); | ||||||
transition: | ||||||
all 0.3s, | ||||||
color 0s; | ||||||
} | ||||||
|
||||||
.burger-button.open { | ||||||
display: flex; | ||||||
color: transparent; | ||||||
visibility: hidden; | ||||||
} | ||||||
|
||||||
.burger-button.close { | ||||||
transition: | ||||||
all 0.3s, | ||||||
color 0.3s cubic-bezier(1, -0.03, 1, 0.49); | ||||||
} | ||||||
|
||||||
.sidebar, | ||||||
.content-wrapper { | ||||||
overflow: unset; | ||||||
} | ||||||
|
||||||
.blurred-background { | ||||||
|
@@ -210,6 +236,7 @@ | |||||
|
||||||
.content-wrapper { | ||||||
flex-direction: row; | ||||||
padding-right: 0; | ||||||
} | ||||||
|
||||||
.sidebar.close { | ||||||
|
@@ -294,12 +321,12 @@ | |||||
} | ||||||
|
||||||
@media screen and (height <= 665px) { | ||||||
.title-container { | ||||||
max-height: 46px; | ||||||
.content-container { | ||||||
gap: 14px; | ||||||
} | ||||||
|
||||||
.sidebar .content-wrapper { | ||||||
padding-right: 12px; | ||||||
.content-wrapper { | ||||||
overflow: hidden scroll; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} | ||||||
|
||||||
|
@@ -308,12 +335,47 @@ | |||||
margin-right: -8px; | ||||||
} | ||||||
|
||||||
.sidebar:not(.open) { | ||||||
padding-top: 80px; | ||||||
.sidebar:not(.open) .title-container { | ||||||
height: 0; | ||||||
min-height: 0; | ||||||
padding: 0; | ||||||
} | ||||||
|
||||||
.burger-button { | ||||||
position: static; | ||||||
display: flex; | ||||||
flex-shrink: 1; | ||||||
align-items: flex-start; | ||||||
width: 66px; | ||||||
height: 100%; | ||||||
min-height: 37px; | ||||||
max-height: 103px; | ||||||
margin: 15px 0 8px 1px; | ||||||
color: var(--main-white); | ||||||
} | ||||||
|
||||||
.sidebar:not(.open) .title-container { | ||||||
display: none; | ||||||
.menu-item:first-of-type { | ||||||
margin-top: 12px; | ||||||
} | ||||||
|
||||||
.content-container { | ||||||
gap: 0; | ||||||
} | ||||||
|
||||||
.sidebar:not(.open) .content-container { | ||||||
flex-direction: column-reverse; | ||||||
} | ||||||
} | ||||||
|
||||||
@media screen and (--small-screen) and (height <= 665) { | ||||||
.burger-button { | ||||||
position: absolute; | ||||||
width: unset; | ||||||
height: unset; | ||||||
min-height: unset; | ||||||
max-height: unset; | ||||||
margin: 0; | ||||||
color: var(--color-button); | ||||||
} | ||||||
} | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
apps/frontend/src/libs/hooks/use-window-width/use-window-width.hook.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
const useWindowWidth = (): number => { | ||
const [windowWidth, setWindowWidth] = useState<number>(window.innerWidth); | ||
|
||
useEffect(() => { | ||
const handleResize = (): void => { | ||
setWindowWidth(window.innerWidth); | ||
}; | ||
|
||
window.addEventListener("resize", handleResize); | ||
|
||
return (): void => { | ||
window.removeEventListener("resize", handleResize); | ||
}; | ||
}, []); | ||
|
||
return windowWidth; | ||
}; | ||
|
||
export { useWindowWidth }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad solution. we need to handle it only with css. without any js