Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ce6ffbc
Update navbar and navigation drawer with new icons, language selectio…
afifvdin Oct 28, 2025
e74a268
Refactor ProfileAvatarButton to correctly dispatch navigation drawer …
afifvdin Oct 28, 2025
f98fb93
Refactor Navbar and AppContent components. Update SCSS for backdrop a…
afifvdin Oct 28, 2025
e61d20c
Refactor AppContent and Navbar components. Update LanguageContainer f…
afifvdin Oct 28, 2025
79b7964
Enhance accessibility in AppContent and LanguageContainer components.…
afifvdin Oct 28, 2025
a03bdce
Replace relative unit with absolute unit, fundraising title, extract …
afifvdin Nov 2, 2025
22274db
Restore onSuffixClicked in Collapsible
afifvdin Nov 3, 2025
150e600
Add shouldSuffixTrigger prop in Collapsible
afifvdin Nov 3, 2025
095846c
fix
afifvdin Nov 9, 2025
3b7336b
Remove quternary from IconColor, rollback link, unused tags, and refa…
afifvdin Nov 9, 2025
332be7d
Remove unnecessary breakpoints and refactor menu
afifvdin Nov 9, 2025
d760a9e
[QF-3593] fix collapsible and language container module
afifvdin Nov 23, 2025
b2c4a9d
[QF-3593] invert condition in more menu collapsible
afifvdin Nov 23, 2025
25f00a6
Merge branch 'testing' into QF-3593
afifvdin Nov 23, 2025
6c3cef5
[QF-3593] remove unused
afifvdin Nov 23, 2025
b8c8364
[QF-3593] refactor
afifvdin Nov 23, 2025
22e4d05
[QF-3593] add missing aria current
afifvdin Nov 23, 2025
67e2587
[QF-3593] remove unused, refactor and maintain logic consistency
afifvdin Nov 23, 2025
248e666
[QF-3593] add focus management issue and accessibility in collapsible
afifvdin Nov 24, 2025
a552946
[QF-3593] add guard at shouldShowOpen in collapsible
afifvdin Nov 24, 2025
9f73625
[QF-3593] fixing test
afifvdin Nov 25, 2025
c933262
[QF-3593] fix collapsible and test
afifvdin Nov 25, 2025
87c7de4
[QF-3593] fix language container dispatcher, donor page load test and…
afifvdin Nov 25, 2025
e94d121
Merge branch 'testing' into QF-3593
afifvdin Nov 30, 2025
418282d
[QF-3593] refactor
afifvdin Dec 1, 2025
8d5e8e6
[QF-3593] refactor button component for ref
afifvdin Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@
},
"ayah": "Ayah",
"ayahs": "Ayahs",
"become-monthly-donor": "Become A Monthly Donor",
"back": "Back",
"beta": "Beta",
"beyond-ramadan": "Grow Beyond Ramadan!",
"bookmark": "Bookmark",
"bookmarked": "Bookmarked",
"both": "Both",
"cancel": "Cancel",
"change-theme": "Change Theme",
"click-here": "Click here",
"close": "Close",
"command-bar": {
Expand Down Expand Up @@ -259,6 +261,7 @@
"juz": "Juz",
"language": "Language",
"languages": "Languages",
"learn": "Learn",
"learn-more": "Learn more",
"learning-plans": "Learning Plans",
"less": "Less",
Expand All @@ -275,6 +278,7 @@
"mode": "Mode",
"more": "More",
"my-learning-plans": "My Learning Plans",
"my-quran": "My Quran",
"navigate": "Navigate",
"network": "Network",
"new": "New!",
Expand Down Expand Up @@ -327,6 +331,7 @@
"q-reflect": "QuranReflect",
"quran-com": "Quran.com",
"quran-radio": "Quran Radio",
"read": "Read",
"reading-history": "Reading history",
"reading-preference": {
"reading": "Reading",
Expand Down Expand Up @@ -366,6 +371,7 @@
},
"seconds": "Seconds",
"see-new": "See What's New",
"select-language": "Select Language",
"settings": {
"no-tafsir-selected": "No tafsir selected",
"no-translation-selected": "No translation selected",
Expand Down
10 changes: 10 additions & 0 deletions public/icons/about.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/icons/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icons/school.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/icons/square-more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/components/AppContent/AppContent.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.contentContainer {
position: relative;
transition: var(--transition-fast);

&::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--color-text-black);
opacity: 0;
pointer-events: none;
transition: var(--transition-fast);
z-index: var(--z-index-smaller-modal);
}

&.dimmed {
&::before {
opacity: var(--opacity-50);
pointer-events: auto;
}
}
}
14 changes: 13 additions & 1 deletion src/components/AppContent/AppContent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import classNames from 'classnames';
import { useRouter } from 'next/router';
import { DefaultSeo } from 'next-seo';
import useTranslation from 'next-translate/useTranslation';
import { shallowEqual, useSelector } from 'react-redux';

import styles from './AppContent.module.scss';

import AudioPlayer from '@/components/AudioPlayer/AudioPlayer';
import AuthRedirects from '@/components/Auth/AuthRedirects';
Expand All @@ -10,6 +14,7 @@ import GlobalListeners from '@/components/GlobalListeners';
import Navbar from '@/components/Navbar/Navbar';
import Footer from '@/dls/Footer/Footer';
import useAuthData from '@/hooks/auth/useAuthData';
import { selectNavbar } from '@/redux/slices/navbar';
import { isAuthPage } from '@/utils/routes';
import { createSEOConfig } from '@/utils/seo';

Expand All @@ -24,6 +29,7 @@ function AppContent({ Component, pageProps }: AppContentProps) {
const { t } = useTranslation('common');
const { userData } = useAuthData();
const isAuth = isAuthPage(router);
const { isNavigationDrawerOpen } = useSelector(selectNavbar, shallowEqual);

return (
<>
Expand All @@ -33,7 +39,13 @@ function AppContent({ Component, pageProps }: AppContentProps) {
<GlobalListeners />
{!isAuth && <Navbar />}
<DeveloperUtility />
<Component {...pageProps} />
<div
className={classNames(styles.contentContainer, {
[styles.dimmed]: isNavigationDrawerOpen,
})}
>
<Component {...pageProps} />
</div>
<AudioPlayer />
{!isAuth && <Footer />}
</>
Expand Down
26 changes: 24 additions & 2 deletions src/components/Navbar/NavbarBody/NavbarBody.module.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
@use "src/styles/utility";
@use "src/styles/breakpoints";
@use 'src/styles/utility';
@use 'src/styles/breakpoints';

.itemsContainer {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 100%;
background-color: var(--color-background-elevated);
position: relative;

&::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--color-text-black);
opacity: 0;
pointer-events: none;
transition: var(--transition-fast);
z-index: var(--z-index-smaller-modal);
}

&.dimmed {
&::before {
opacity: var(--opacity-50);
pointer-events: auto;
}
}
}

.centerVertically {
Expand Down
33 changes: 28 additions & 5 deletions src/components/Navbar/NavbarBody/ProfileAvatarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ import { useDispatch } from 'react-redux';
import styles from './ProfileAvatarButton.module.scss';

import Button, { ButtonShape, ButtonSize, ButtonVariant } from '@/dls/Button/Button';
import IconContainer, { IconColor } from '@/dls/IconContainer/IconContainer';
import PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';
import useLogout from '@/hooks/auth/useLogout';
import BookmarkIcon from '@/icons/bookmark.svg';
import ClockIcon from '@/icons/clock.svg';
import ArrowIcon from '@/icons/east.svg';
import ReaderIcon from '@/icons/learning-plan.svg';
import LogoutIcon from '@/icons/logout.svg';
import NotesIcon from '@/icons/notes-with-pencil.svg';
import NotificationBellIcon from '@/icons/notification-bell.svg';
import IconPerson from '@/icons/person.svg';
import { setIsNavigationDrawerOpen } from '@/redux/slices/navbar';
import { setIsSidebarNavigationVisible } from '@/redux/slices/QuranReader/sidebarNavigation';
import { isLoggedIn } from '@/utils/auth/login';
import { logButtonClick } from '@/utils/eventLogger';
Expand All @@ -28,7 +30,11 @@ import {
getReadingGoalProgressNavigationUrl,
} from '@/utils/navigation';

const ProfileAvatarButton = () => {
type ProfileAvatarButtonProps = {
isPopoverPortalled?: boolean;
};

const ProfileAvatarButton = ({ isPopoverPortalled = true }: ProfileAvatarButtonProps) => {
const [isOpen, setIsOpen] = useState(false);
const { t } = useTranslation('common');
const router = useRouter();
Expand All @@ -53,6 +59,13 @@ const ProfileAvatarButton = () => {
});
};

const onMyQuranClicked = () => {
logButtonClick('profile_avatar_my_quran');
router.push(getProfileNavigationUrl()).then(() => {
setIsOpen(false);
});
};

const onNotificationSettingsClicked = () => {
logButtonClick('profile_avatar_notification_settings');
router.push(getNotificationSettingsNavigationUrl()).then(() => {
Expand Down Expand Up @@ -85,6 +98,7 @@ const ProfileAvatarButton = () => {
return (
<PopoverMenu
isModal={false}
isPortalled={isPopoverPortalled}
trigger={
<Button
tooltip={t('profile')}
Expand All @@ -101,9 +115,15 @@ const ProfileAvatarButton = () => {
isOpen={isOpen}
onOpenChange={setIsOpen}
>
<PopoverMenu.Item onClick={onProfileClicked} icon={<ArrowIcon />}>
<PopoverMenu.Item onClick={onProfileClicked} icon={<IconPerson />}>
{t('profile')}
</PopoverMenu.Item>
<PopoverMenu.Item
onClick={onMyQuranClicked}
icon={<IconContainer icon={<BookmarkIcon />} color={IconColor.accent} />}
>
{t('my-quran')}
</PopoverMenu.Item>
<PopoverMenu.Item onClick={onNotificationSettingsClicked} icon={<NotificationBellIcon />}>
{t('notification-settings')}
</PopoverMenu.Item>
Expand All @@ -127,10 +147,13 @@ const ProfileAvatarButton = () => {
<Button
tooltip={t('sign-in')}
ariaLabel={t('sign-in')}
variant={ButtonVariant.Simplified}
variant={ButtonVariant.SimplifiedAccent}
size={ButtonSize.Small}
href={getLoginNavigationUrl(router.asPath)}
onClick={onTriggerClicked}
onClick={() => {
dispatch({ type: setIsNavigationDrawerOpen.type, payload: false });
onTriggerClicked;
}}
id="login-button"
className={styles.loginButton}
>
Expand Down
Loading