Skip to content
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

Release 1.18.0 #1418

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Release 1.18.0 #1418

wants to merge 8 commits into from

Conversation

YassinNouh21
Copy link
Contributor

@YassinNouh21 YassinNouh21 commented Nov 10, 2024

Description:

This PR introduces the following changes:

  1. Fix/Remove android.mawaqit.net Backend Configuration (Fix / Remove android.mawaqit.net backend #1396)

    • Removed all configurations related to the android.mawaqit.net backend.
    • Refactored MawaqitBackendSettingsConstants class to correct a typo in its name.
  2. Feat/Add Third Jumu'a Section (Feat/ Add a Third Jumua Section #1395)

    • Added a new section to support the third Jumu'a prayer time.
    • Refactored JumwaWidget to handle multiple Jumu'a times more effectively.
      • Added getOrderedJumaTimes method to collect and order available Jumu'a times.
      • Updated jumu'aTile to handle cases where jumu'a1 is null but jumu'a2/3 exist.
      • Removed direct dependency on jumu'a field, allowing for a more flexible null-checking process.
  3. Switch Condition for Arabic Language (Fix/ Flash message orientation changes when change the screen orientation #1407)

    • Modified a switch condition to support cases when appLang is set to Arabic (ar).

* remove all android mawaqit backend config

* refactor(constants): fix typo in MawaqitBackendSettingsConstants class name

---------

Co-authored-by: Yassin <[email protected]>
* add section for third jumua time

* refactor(JumuaWidget): improve handling of multiple jumua times

- Add getOrderedJumuaTimes method to collect and order available jumua times
- Refactor jumuaTile to handle cases where jumua1 is null but jumua2/3 exist
- Remove direct dependency on jumua field being non-null

---------

Co-authored-by: Yassin <[email protected]>
Copy link
Contributor

@ghassenbenzahra123 ghassenbenzahra123 left a comment

Choose a reason for hiding this comment

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

LGTM!

YassinNouh21 and others added 4 commits November 22, 2024 18:26
# Conflicts:
#	lib/src/const/constants.dart
#	lib/src/widgets/MawaqitDrawer.dart
…1392)

* working local app link rtsp

* feat: add new localization keys and placeholders for Quran-related st… (#1402)

* feat: add new localization keys and placeholders for Quran-related strings

- Added new keys for Quran reading page placeholders in portrait mode in intl_sq.arb and intl_bs.arb
- Introduced 'switchQuranType' placeholder with 'name' in intl_sq.arb and intl_bs.arb
- Updated onboarding_language_selector.dart to include debug print for locale language code
- Ensured proper formatting with newlines at the end of arb files

* fix: remove Montenegrin because flutter doesn't support it

* remove the print

* Feat/quran/auto scrolling reading (#1389)

* feat(auto_reading): add state management for auto reading feature

- Implement `AutoScrollState` to handle auto scroll speed, visibility, and font size settings.
- Add `AutoScrollNotifier` to manage auto-scrolling functionality with start, stop, and speed control.
- Include derived properties for controlling the visibility of speed control and scroll behavior.
- Support toggling between single-page view and auto-scrolling.

* feat(quran): add play toggle button and refactor directory structure

- Add play toggle button to `QuranReadingScreen` with portrait and landscape support.
- Move `quran_reading_screen.dart` to new `reading` directory for better organization.
- Create `QuranFloatingActionButtons` widget for handling floating action buttons in portrait and landscape modes.

* refactor: Extract floating action controls into new widget with passed focus nodes

- Extracted floating action controls into `QuranFloatingActionControls` widget.
- Used `OrientationBuilder` within the new widget to determine orientation internally.
- Passed focus nodes from `QuranReadingScreen` to the new widget for external focus management.
- Maintained existing UI and design without modifications.

* feat: add the to_string and making the AutoScrollNotifier auto disposed

* modify the new ui

* feat: add auto-scrolling reading mode with font size and speed controls

- QuranFloatingActionControls:
  - Implemented `_buildAutoScrollingReadingMode` to display controls when auto-scroll is active.
  - Added methods:
    - `_buildFontSizeControls` for adjusting font size.
    - `_buildSpeedControls` for adjusting auto-scroll speed.
    - `_buildPlayPauseButton` for toggling auto-scroll.
    - `_buildActionButton` as a helper for creating action buttons.
  - Modified `_buildFloatingPortrait` and `_buildFloatingLandscape` to display auto-scroll controls based on the current state.

- AutoScrollState:
  - Fixed `isAutoScrolling` getter to correctly represent the auto-scrolling state.

- AutoScrollNotifier:
  - Added methods:
    - `increaseFontSize` and `decreaseFontSize` to adjust font size.
    - `increaseSpeed` and `decreaseSpeed` to adjust auto-scroll speed.
  - Updated `startAutoScroll` to use dynamic speed settings.

* fix: scrolling functionality and refactor Quran reading code

- Implement auto-scrolling that aligns with the current page and page height.
- Refactor floating action buttons into separate widget classes for better code organization.
- Update auto-scroll state and notifier to handle scroll controller and dynamic speed adjustments.

* refactor QuranReadingScreen: Remove unused imports and redundant widget functions

- Removed unnecessary imports such as SvgPicture and ReciterSelectionScreen.
- Cleaned up redundant widget methods like `buildFloatingPortrait`, `buildFloatingLandscape`, and other floating action button handlers.
- Simplified the UI logic by eliminating unused `QuranModeButton` and `PlayToggleButton` widgets.

* merge on main

* refactor: remove unused floating action buttons

* refactor: migrate screen rotation to state management

- Add isRotated field to QuranReadingState to manage rotation state
- Add toggleRotation method to QuranReadingNotifier
- Remove local ValueNotifier for rotation management
- Update QuranFloatingActionControls to use state-managed rotation
- Simplify _OrientationToggleButton to use state rotation
- Remove orientation dependencies from UserPreferencesManager

* refactor(quran): improve keyboard navigation and focus management

- Replace custom key event handlers with FocusTraversalPolicy for better focus management
- Add ArrowButtonsFocusTraversalPolicy to handle navigation between left/right buttons
- Implement up/down navigation from arrow buttons to back button and page selector
- Fix positioning issues with Stack and Positioned widgets
- Remove ValueNotifier in favor of setState for rotation state management
- Clean up widget hierarchy and remove redundant wrapper classes
- Add proper focus order using FocusTraversalOrder
- Fix duplicate Positioned widgets causing layout issues
- Improve code organization and readability

* remove unused `ArrowButtonsFocusTraversalPolicy` in the quran_reading_widgets.dart

* fix: resolve Positioned widget conflicts and improve focus navigation

- Remove nested Positioned widgets causing render conflicts
- Fix focus navigation system in reading screen:
  * Add proper FocusTraversalOrder for all interactive elements
  * Implement custom ArrowButtonsFocusTraversalPolicy
  * Add keyboard navigation support (arrows, tab, enter/space)
- Reorganize widget tree structure to prevent parent data conflicts
- Improve navigation button layout and accessibility
- Fix RTL/LTR direction handling in navigation buttons

* remove the unnecessary `FocusTraversalGroup` and order

* refactor: remove `QuranFocusTraversalPolicy` class from `quran_floating_action_buttons.dart`

* refactor: implement strategy pattern for Quran reading view and focus management

Introduced the `QuranViewStrategy` abstract class and created two concrete strategies, `AutoScrollViewStrategy` and `NormalViewStrategy`, to handle view and control layout for different Quran reading modes. Replaced previous inline focus management with a new `FocusNodes` helper class for organizing focus nodes. Refactored loading and error indicators into separate widget methods for cleaner code structure. This update enhances readability and allows for easier expansion of view strategies in the future.

* refactor: add font size and speed controls for Quran auto-scrolling mode

- Updated `autoScrollSpeed` default value in `AutoScrollState` to 0.1 for a slower starting speed.
- Added `cycleFontSize` and `cycleSpeed` methods in `AutoScrollNotifier` to allow cycling through font sizes and scroll speeds with a single button, improving user control and simplifying UI.
- Refactored `_FontSizeControls` and `_SpeedControls` widgets to use a single `_ActionButton` for adjusting font size and speed, displaying current values in tooltips.
- Re-introduced `_ActionButton` class with autofocus support for enhanced focus management.

* refactor: Quran reading widgets for improved modularity and maintainability

- Converted functions in `quran_reading_widgets.dart` into distinct `ConsumerWidget` classes:
  - `VerticalPageViewWidget`, `HorizontalPageViewWidget`
  - `RightSwitchButtonWidget`, `LeftSwitchButtonWidget`
  - `PageNumberIndicatorWidget`, `MoshafSelectorPositionedWidget`
  - `BackButtonWidget`, `SvgPictureWidget`

* feat: add scaling the size of the pages with the font

* feat: add stop and pause and add close the mode

* fix: maintain scroll position and speed when changing auto-scroll settings

- Prevent scroll position reset when changing scroll speed
- Only restart timer instead of full scroll reinitialize when adjusting speed

* remove _handleFloatingActionButtons in the quran floating action

* feat(quran-reader): Add auto-scroll pause/resume on tap

- Add tap gesture detection to auto-scrolling view
- Implement play/pause toggle functionality on tap
- Disable manual scrolling in auto-scroll mode
- Clean up code formatting and indentation

* reformat

* feat(quran): integrate surah name display in SurahSelectorWidget

- Replace icon with current surah name display in the top bar
- Add transparent background with white text for better visibility
- Maintain existing dialog functionality for surah selection

* feat(ui): show quran reading controls in both portrait & landscape modes

- Remove orientation-specific conditional rendering
- Display navigation controls, surah selector and page indicators in all orientations
- Maintain consistent control behavior across screen modes

* fix: portrait mode focus traversal for Quran reading screen

- Removed unused `FocusScopeNode` in `QuranFloatingActionControls`.
- Introduced a new focus traversal policy (`PortraitModeFocusTraversalPolicy`) for better keyboard navigation in portrait mode.
- Updated `_buildBody` to handle focus nodes in both portrait and landscape orientation

* refactor: `quran_floating_action_buttons.dart` for dynamic button sizing and improved readability

- Updated button and icon sizes to scale dynamically based on screen width, enhancing UI consistency across different devices.

* refactor

* refactor(quran-reading): update back button behavior and add exit button focus handling

- Removed the `BackButtonWidget` from the `quran_reading_screen.dart` page to simplify UI elements.
- Enhanced the `_ExitButton` widget in `quran_floating_action_buttons.dart`:
- Changed from `ConsumerWidget` to `ConsumerStatefulWidget` for state management.
- Added a `FocusNode` for the exit button to set autofocus on load.
- Implemented an `initState` method to request focus after widget binding.

* feat: add name for the exitFocusNode

* reformat

* keep highlight one same salah item until iqama (#1394)

* stable rtsp & youtube live url links

* Fix/ Error in console for 403 images for loading the reciters (#1382)

* switch to extended image package to handle exception throw

* switch extended image version

* Update pubspec.yaml

* switch to fast cached library as a temp workaround

---------

Co-authored-by: Ibrahim ZEHHAF <[email protected]>

* add missing translation strings and fix focus issue

* use correct constants

* fix translation string and add french

* add arabic translation

* add internet check to setup feature

* edit wrong translation

* refactor & applied all review suggestions

* Feat/close quran when salah (#1408)

* feat(routes): add Quran-specific routes and route generator

* refactor(routes): migrate to named routes and simplify navigation logic in the quran

* fix: Improve Quran mode selection navigation

- Modify route generator to handle QuranModeSelection separately

* fix: waiting for the handle push

* fix the formating

* fix: Pop the screen while it has dialog in reading

* refactor: AdhanSubScreen to use ConsumerStatefulWidget and manage Quran mode

- Updated AdhanSubScreen to use `ConsumerStatefulWidget` and `ConsumerState` for improved state management with Riverpod.
- Moved Quran mode exit logic to AdhanSubScreen and JummuaLive components, removing redundant code from salah_workflow.
- Added post-frame callback in AdhanSubScreen and JummuaLive to trigger `exitQuranMode` via `quranNotifierProvider`.

* pause quran player when adhan begins

---------

Co-authored-by: Ghassen Ben Zahra <[email protected]>

* format code

* add missing import

* fix stuck at loading

* fix merging import

* refactor: use constants for RTSP camera preference keys

* fix spelling mistake of `clearSnackBarFlag`

* refactor: Enhance resource cleanup with proper dispose methods in RTSPCameraStreamNotifier

* refactor: RTSP Camera Stream Management and Add Error Handling

* refactor: RTSP Camera Stream Notifier for improved validation and error handling

- Added `_initializeFromSavedUrl` to handle saved URL initialization with better URL validation logic.
- Enhanced `toggleEnabled` method to pause/resume streams based on RTSP state changes.
- Refactored `updateStream` to validate URL formats and handle errors gracefully.
- Introduced new exception classes (`URLNotProvidedRTSPURLException`, `YouTubeVideoIdExtractionException`) for specific error scenarios.
- Improved user feedback via snackbars on URL validation changes.
- Extended `RTSPCameraSettingsState` with Equatable for better comparison and added `isInvalidUrl` flag.
- Refined `JummuaLive` and RTSP settings screen logic to improve error handling and user experience.
- Added `_buildErrorScreen` for consistent error display and retry functionality.
- Consolidated and clarified RTSP stream state management for YouTube and RTSP sources.

* fix: jumma live not switching in the Youtube

* fix: jumma switching

* fix the ci formating

* refactor:  automatically handle both RTSP and YouTube URLs, and the stream from the RTSP settings will override the mosque manager's stream when valid.

* fix: manage correctly the dispose of the controllers

---------

Co-authored-by: Yassin Nouh <[email protected]>
Co-authored-by: Ibrahim ZEHHAF <[email protected]>
Co-authored-by: Yassin <[email protected]>
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.

3 participants