-
Notifications
You must be signed in to change notification settings - Fork 4
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
Rework Mobile #748
Rework Mobile #748
Conversation
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.
@@ -199,9 +199,9 @@ export function OutlineListSelector(props: { | |||
|
|||
return <section className="graveyard-menu-colors selector-section"> | |||
<h2>{translate("menu.lobby.roleList")}: {roleList.length}</h2> | |||
<button disabled={props.disabled} onClick={simplify}> | |||
{!props.disabled && <button onClick={simplify}> |
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.
i would always slap a === true or === false on these and also capital b Button not button
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.
nitpick yknow
bothAreObjects && | ||
Object.keys(a).length === Object.keys(b).length && | ||
Object.entries(a).every(([k, v]) => deepEqual(v, b[k as keyof T])) | ||
); |
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.
I dont know why you need Boolean here and i dont know what it does
@@ -39,7 +55,7 @@ export function useGameState<T>( | |||
usePacketListener((type?: StateEventType) => { | |||
if (GAME_MANAGER.state.stateType === "game" && (events ?? []).includes(type as StateEventType)) { | |||
const value = getValue(GAME_MANAGER.state); | |||
if (value !== state) { | |||
if (!deepEqual(value, state)) { |
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.
based and red pilled
window.addEventListener("beforeunload", onBeforeUnload); | ||
return () => window.removeEventListener("beforeunload", onBeforeUnload); | ||
}, []) | ||
|
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.
i dont know why this is here or what it does
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.
i guess i should look
border: .13rem solid var(--primary-border-color); | ||
border-bottom-color: var(--primary-border-shadow-color); | ||
border-right-color: var(--primary-border-shadow-color); | ||
border-radius: 1rem; | ||
} |
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.
@@ -38,6 +41,7 @@ export default function SpectatorGameScreen(): ReactElement { | |||
<HeaderMenu chatMenuNotification={false}/> | |||
</div> | |||
<GameScreenMenus /> | |||
{mobile && <MenuButtons chatMenuNotification={false}/>} |
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.
mobile === true if your really based
sammy when he doesnt know what comments to leave
@@ -24,6 +24,7 @@ pub struct LobbyClient{ | |||
} | |||
|
|||
#[derive(Clone, Debug, Serialize, PartialEq, Eq)] | |||
#[serde(rename_all = "camelCase")] |
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.
i am so confused why this wasnt causing problems before
@@ -68,7 +68,7 @@ impl Lobby { | |||
return | |||
}; | |||
|
|||
let text = text.trim_newline().trim_whitespace().truncate(100).truncate_lines(1); | |||
let text = text.trim_newline().trim_whitespace().truncate(100); |
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.
i like this change
@@ -164,6 +194,15 @@ export default function GameScreen(): ReactElement { | |||
["addChatMessages"] | |||
)!; | |||
|
|||
useEffect(() => { | |||
const onBeforeUnload = (e: BeforeUnloadEvent) => { | |||
if (!DEV_ENV) e.preventDefault() |
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.
ok i see
I looked this up and couldnt test it because i couldnt even get in a lobby
I see the idea
Its weird that this is how you call that, can we put our own custom text?
I would like it so that if you confirm that you want to leave it sends a message to the server saying that you left
This way it kills your player in game
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.
I don't think so, and I don't think there's a way to make code run when they confirm.
Maybe if you do a window.confirm? But we can do that 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.
Why is encyclopedia gone when i am on mobile? I disagree with this.
Lobby menu is too small horizontally on desktop.
Settings menu is too small horizontally on desktop.
Encyclopedia menu is too small horizontally on desktop, talking about the cover card version.
I'm assuming you set up the max menu default count on mobile to be 2, but I didn't test that
We had a phone call about all of these points - merging |
No description provided.