-
Notifications
You must be signed in to change notification settings - Fork 11
Integrate Firebase Remote Config and update dependencies #293
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: dev
Are you sure you want to change the base?
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.
- 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
src/common/firebase/remoteConfig.js
Outdated
|
|
||
| await setDefaults(rc, defaultConfig); | ||
|
|
||
| await fetchAndActivate(rc); |
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.
Should these be in a try-catch block to avoid app crash if any of these firebase operations fail?
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.
fixed
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 }); |
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.
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/", |
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.
http://10.0.0.45:3000/v1
This looks like a local ip address. Is this correct?
| // import { constant } from "@common"; | ||
| import { dummyData, dummyArtists } from "./dummyData"; | ||
|
|
||
| // Common API configuration |
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.
The entire codebase is commented out here. Remove if not needed.
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.
fixed
- 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.
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