Integrate Firebase Remote Config and update dependencies#293
Open
amitojsingh wants to merge 29 commits intodevfrom
Open
Integrate Firebase Remote Config and update dependencies#293amitojsingh wants to merge 29 commits intodevfrom
amitojsingh wants to merge 29 commits intodevfrom
Conversation
- Updated import paths for TrackPlayerUtils and AudioPlayer. - Moved AudioPlayer to common index for better accessibility. - Removed deprecated AudioPlayer and useTrackPlayer components along with their associated utilities. - Cleaned up ReaderScreen to utilize the new structure.
- Added alias for @service in babel.config.js for improved module resolution. - Disabled new architecture in android/gradle.properties for compatibility. - Updated AndroidManifest.xml to export MusicService for proper functionality. - Refactored ReaderScreen to utilize the new AudioPlayer component structure. - Removed deprecated AudioPlayer component and styles from common components. - Updated TrackPlayerUtils to streamline player setup and removed unused event listeners.
- Updated AudioPlayer component to include navigation and title props. - Refactored audio settings in the Settings component to support auto-play and sync scroll options. - Implemented new actions and reducers for managing audio settings and manifest. - Improved API handling for fetching audio manifest and artists. - Added styles for download controls and updated localization strings for audio settings. - Removed deprecated useTrackPlayer hook to streamline audio management.
- Added useSelector to access isAudioAutoPlay state from Redux. - Implemented useEffect to handle audio auto-play when currentPlaying is active. - Enhanced play/pause functionality to accommodate auto-play behavior.
- Added useSelector to retrieve defaultAudio from Redux state. - Enhanced track selection logic to prioritize default audio track if available. - Maintained fallback to the first track in the manifest if no default track is found.
- Updated useAudioManifest hook to map API manifest data to new structure, including track_id and additional track properties. - Modified audio.jsx to enhance logging for fetched artist data. - Adjusted audioApi.js to streamline API requests for fetching manifests and artists, ensuring consistent endpoint usage. - Removed unused queue retrieval in TrackPlayerUtils.js to clean up code.
- Introduced AudioTrackDialog and AudioControlBar components for better track selection and control. - Added BlurView overlay for improved visual aesthetics. - Updated state management to default showTrackModal to true. - Refactored play/pause and track selection functionalities for enhanced user experience. - Cleaned up unused code and styles for better maintainability.
- Added ESLint rules for unused styles and integrated react-native plugin for better linting. - Updated Babel configuration to correct service path alias. - Added new font asset (BalooPaaji2) to both iOS and Android platforms. - Enhanced ReaderScreen with animated footer and improved audio player controls. - Refactored AutoScrollComponent and AudioPlayer components for better performance and maintainability. - Removed deprecated components and streamlined imports for cleaner code structure. - Updated VSCode settings for improved development experience.
- Added @miblanchard/react-native-slider to package.json for improved audio control. - Updated AudioPlayer component to utilize the new slider for track progress. - Enhanced UI elements in AudioPlayer and related components to support night mode. - Refactored styles for better responsiveness and visual consistency. - Updated localization strings for improved user experience.
- Added initialization of Firebase Remote Config in app.js to enhance app configuration management. - Updated Firebase dependencies in package.json to version 23.1.2 for improved functionality and performance. - Adjusted Babel configuration to include new path alias for @config. - Enhanced ReaderScreen to utilize audio settings from Remote Config. - Updated Podfile.lock to reflect new Firebase versions and ensure compatibility.
19 tasks
- Upgraded Firebase packages in package.json and Podfile.lock to version 12.1.0 for improved performance and features. - Refactored AudioPlayer component to utilize default audio settings from Redux state, enhancing user experience. - Introduced new hooks and state management for better audio track handling and settings. - Improved UI elements in AudioPlayer and related components for better responsiveness and visual consistency. - Updated action creators and reducers to support new default audio structure.
- Updated ActionComponent to dynamically set background and text colors based on night mode and selector state. - Enhanced AudioControlBar to handle optional displayName gracefully. - Modified AudioTrackDialog to allow optional title and header/footer props with default values. - Cleaned up logging in useAudioManifest hook to streamline code.
…rganization - Added import/order rule to ESLint for better import organization and readability. - Refactored import statements across multiple components to maintain consistent ordering and structure. - Updated project files to ensure compliance with new ESLint rules, enhancing overall code quality.
…y and functionality - Updated font family in styles for better readability. - Enhanced ActionComponent layout with a new wrapper for action button content. - Adjusted AudioControlBar to improve slider appearance and timestamp display. - Modified AudioTrackDialog to update button text and added new localization strings. - Refactored icon components to standardize stroke properties and improve responsiveness.
- Integrated useRemote hook to fetch REMOTE_DB_URL for database updates across DatabaseUpdate and Download components. - Updated checkForBaniDBUpdate function to accept REMOTE_DB_URL as a parameter for improved flexibility. - Enhanced audio API requests in useAudioManifest and audio components to utilize remote configuration for authentication. - Cleaned up constant.js by removing hardcoded URLs and credentials, promoting better configuration management.
… code - Removed unused props from AudioControlBar and AudioTrackDialog for better clarity. - Updated prop types in ChevronRight component to use default values, enhancing type safety.
…rformance - Upgraded react-native-gesture-handler to version 2.28.0 for better gesture handling. - Updated Android Gradle plugin to version 8.8.2 for improved build performance. - Incremented versionCode in Android app build.gradle for the upcoming release. - Modified MCP server configuration for updated local development settings. - Refactored font assets in ReaderScreen to replace deprecated variable font with regular and semi-bold variants. - Enhanced ReaderScreen components for better responsiveness and UI consistency. - Cleaned up unused imports and improved code organization across various components.
…udio-setting-design Update Firebase dependencies and enhance AudioPlayer functionality
Gauravjeetsingh
requested changes
Sep 29, 2025
src/common/firebase/remoteConfig.js
Outdated
|
|
||
| await setDefaults(rc, defaultConfig); | ||
|
|
||
| await fetchAndActivate(rc); |
Collaborator
There was a problem hiding this comment.
Should these be in a try-catch block to avoid app crash if any of these firebase operations fail?
src/common/firebase/remoteConfig.js
Outdated
|
|
||
| export const initRC = async () => { | ||
| // Dev: 1-min interval; Prod: 12h (43,200,000 ms) | ||
| await setConfigSettings(rc, { minimumFetchIntervalMillis: 43200000 }); |
Collaborator
There was a problem hiding this comment.
The fetch interval is hardcoded to 12 hours, but as per comment above, if it's dev environment it should be 1 min, right?
Should this condition be added here?
src/config/remoteConfig.js
Outdated
| REMOTE_DB_URL: "https://banidb.blob.core.windows.net/database", | ||
| BASIC_AUTH_USERNAME: "admin", | ||
| BASIC_AUTH_PASSWORD: "", | ||
| REMOTE_AUDIO_API_URL: "http://10.0.0.45:3000/v1/", |
Collaborator
There was a problem hiding this comment.
http://10.0.0.45:3000/v1
This looks like a local ip address. Is this correct?
| @@ -2,8 +2,8 @@ | |||
| import { dummyData, dummyArtists } from "./dummyData"; | |||
|
|
|||
| // Common API configuration | |||
Collaborator
There was a problem hiding this comment.
The entire codebase is commented out here. Remove if not needed.
- Added error handling in remoteConfig.js to prevent app crashes when fetching remote values. - Updated remoteConfig.js to ensure default values are returned when remote values are unavailable. - Changed REMOTE_AUDIO_API_URL in remoteConfig.js to a production URL for improved API access. - Refactored audioApi.js to streamline API request logic and enhance error handling. - Cleaned up commented-out code in audioApi.js for better readability.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Firebase Remote Config + Audio Feature Flag
Summary
IS_AUDIO_FEATURE_ENABLED) to toggle remotely.23.1.2and Firebase iOS pods →12.1.0.logScreenViewwithlogEvent('screen_view', …).Why
Notes
initRC()runs at app startup (with 12h fetch interval) so defaults are always present offline.Settingsnow only shows Audio if flag is enabled.Next steps