-
-
Notifications
You must be signed in to change notification settings - Fork 503
QF-2514: Navigation redesign #2436
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
base: testing
Are you sure you want to change the base?
Conversation
…or logged-out users
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…tMenu documentation
bugbot run |
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.
Pull Request Overview
This PR refactors the Quran reader’s navigation and context menu components while introducing new features such as improved reading preference switching, page bookmarking, and mobile reading tabs. Key changes include a reorganization of the ContextMenu component with enhanced accessibility and styling, new icons and UI adjustments for the reading preference switcher, and added functionality for bookmarking pages.
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/components/QuranReader/ReadingPreferenceSwitcher/ReadingPreferenceSwitcher.module.scss | Updated width definitions and introduced new CSS variables for context menu variants. |
src/components/QuranReader/ReadingPreferenceSwitcher/ReadingPreferenceOption.tsx | Renamed the component and revised its loading state logic along with enhanced JSDoc comments. |
src/components/QuranReader/ReadingPreferenceSwitcher/ReadingPreferenceIcon.tsx | New component to encapsulate reading preference icon rendering. |
src/components/QuranReader/ReadingPreferenceSwitcher/ReadingPreference.module.scss | Added new theme-based styling rules and transitions. |
src/components/QuranReader/QuranReaderView.tsx | Updated usage of the ReadingPreferenceSwitcher via a new type prop. |
src/components/QuranReader/ContextMenu/* | Introduced refactored components with improved layout, theming, and mobile responsiveness, including progress tracking, mobile tabs, bookmark actions, and chapter navigation. |
locales/en/* | Updated textual content and fixed duplicate keys in translations. |
Comments suppressed due to low confidence (1)
src/components/QuranReader/ReadingPreferenceSwitcher/ReadingPreferenceOption.tsx:44
- The loading condition has been simplified to always render the spinner when isLoading is true, removing the check for whether readingPreference equals selectedReadingPreference. Please verify that this behavior change is intentional and will not cause unintended UI behavior.
return isLoading ? (
src/components/QuranReader/ContextMenu/components/MobileReadingTabs.tsx
Outdated
Show resolved
Hide resolved
…gTabs.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
@osamasayed resolved all bot reported bugs. |
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.
@@ -1,3 +1,12 @@ | |||
/** |
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.
let's remove this file if we don't need it.
} = usePersistPreferenceGroup(); | ||
|
||
// Extract verse number from the last read verse key | ||
const lastReadVerse = lastReadVerseKey.verseKey?.split(':')[1]; |
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.
We have a util called getVerseNumberFromKey
which we should use instead.
@@ -5,7 +5,7 @@ import classNames from 'classnames'; | |||
import useTranslation from 'next-translate/useTranslation'; | |||
import { shallowEqual, useSelector } from 'react-redux'; | |||
|
|||
import ContextMenu from './ContextMenu'; | |||
import ContextMenu from './ContextMenu/index'; |
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.
nit-picking: no need for index
in the path as it will be resolved automatically.
}; | ||
|
||
let bookmarkIcon = <Spinner />; | ||
if (!isPageBookmarkedLoading) { |
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.
It seems requested don't get cached in the browser using useSWR on scroll so fresh requests to check if the page is bookmarked keep being fired every time. You should open Albqarah while logged in and scroll up and down to reproduce.
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 already have this on my backlog, I will work on it insha'Allah, I forgot to convert this PR to Draft instead of ready for review.
Summary
Closes: QF-2514
Type of change
Test plan
The changes was tested on home page and the Quran reader for responsiveness.
Checklist