Skip to content

Mobile support added#8

Merged
flowyan merged 1 commit into
mainfrom
2-mobile-support
Jun 27, 2025
Merged

Mobile support added#8
flowyan merged 1 commit into
mainfrom
2-mobile-support

Conversation

@flowyan
Copy link
Copy Markdown
Member

@flowyan flowyan commented Jun 27, 2025

No description provided.

@flowyan flowyan linked an issue Jun 27, 2025 that may be closed by this pull request
@flowyan flowyan requested a review from Copilot June 27, 2025 20:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds mobile support to the application by updating several UI components and introducing a new hook for responsiveness. Key changes include:

  • Adding the new useIsMobile hook to detect mobile viewports.
  • Updating the CurrentUser, Navbar, and MobileMenu components to conditionally render elements based on mobile status.
  • Adjusting layout exports and removing the deprecated Sidebar Navbar component.

Reviewed Changes

Copilot reviewed 14 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/users/components/CurrentUser/CurrentUser.tsx Adjusts the layout to hide the logout icon on mobile and conditionally renders elements based on mobile detection.
src/modules/system/hooks/useIsMobile.tsx Introduces a new hook to detect mobile viewports.
src/modules/system/hooks/index.ts Exports the new useIsMobile hook.
src/modules/layout/components/index.ts Updates component exports to include Navbar instead of Sidebar.
src/modules/layout/components/Sidebar/Navbar.tsx Removed in favor of modern, mobile-aware Navbar components.
src/modules/layout/components/Navbar/index.ts Adds export for the new MobileMenu component.
src/modules/layout/components/Navbar/Navbar.tsx Implements a mobile-responsive Navbar that switches layouts based on viewport size.
src/modules/layout/components/Navbar/MobileMenu/MobileMenu.tsx Implements a dedicated mobile menu with correct link rendering and user options.
src/modules/layout/components/Navbar/Links/Links.tsx Adjusts icon size usage through a new parameterized links function.
src/modules/layout/components/Navbar/AdminLinks/AdminLinks.tsx Updates admin links to be consistent with the new mobile-aware design.
src/modules/app/components/DiscordLoginOverlay/DiscordLoginOverlay.tsx Updates layout constraints and typography for better mobile readability.
src/modules/app/components/Banner/Banner.tsx Refactors tooltip events and updates styling for improved presentation.
src/modules/app/components/Banner/Banner.module.scss Centers banner text to improve layout aesthetics.

<Flex align={"center"} p={"xs"}>
<Flex align={"center"} gap={"sm"} w={"100%"}>
{!isMobile && (
<ActionIcon onClick={logout} className={styles.logout} variant="transparent">
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

Consider adding an aria-label to the ActionIcon for the logout function to improve accessibility for screen readers.

Suggested change
<ActionIcon onClick={logout} className={styles.logout} variant="transparent">
<ActionIcon onClick={logout} className={styles.logout} variant="transparent" aria-label="Log out">

Copilot uses AI. Check for mistakes.
return (
<Menu withinPortal={false} opened={opened} onChange={setOpened}>
<Menu.Target>
<ActionIcon variant="transparent" size={"xl"}>
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

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

Consider adding an aria-label to the mobile menu toggle ActionIcon to enhance accessibility and clarify its purpose for assistive technologies.

Suggested change
<ActionIcon variant="transparent" size={"xl"}>
<ActionIcon
variant="transparent"
size={"xl"}
aria-label={opened ? "Close menu" : "Open menu"}
>

Copilot uses AI. Check for mistakes.
@flowyan
Copy link
Copy Markdown
Member Author

flowyan commented Jun 27, 2025

CONSIDER MY BALLS BRO

@flowyan flowyan merged commit 9e08e2c into main Jun 27, 2025
1 check passed
@flowyan flowyan deleted the 2-mobile-support branch June 27, 2025 20:48
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.

Mobile support

2 participants