Skip to content

Fix/improved pagination #50

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

Merged
merged 15 commits into from
Apr 30, 2025
Merged

Fix/improved pagination #50

merged 15 commits into from
Apr 30, 2025

Conversation

bhavik-m-7span
Copy link
Collaborator

Description

Improved pagination for page count
Added Firebase distribution in Local script and CI/CD workflow

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

#49

- Removed `limit` parameter from `fetchPostData` in `IHomeRepository` and `HomeRepository`.
- Updated `makeFetchPostsRequest` to use `ApiEndpoints.pageSize` for the `_limit` query parameter.
- In `HomeBloc`, removed `_page` and `_limit` variables.
- Refactored `_fetchPosts` and `_onLoadMorePosts` to utilize the new `fetchPostData` signature.
- Modified `HomeState` to calculate `nextPage` based on `postList.length` and `ApiEndpoints.pageSize`.
- Added `pageSize` constant in `ApiEndpoints`.
- Improved the code comments in `HomeState` related to the calculation of `nextPage`
- Documented that `nextPage` calculation depends on whether API pagination starts with 0 or 1.
- Added examples for both scenarios.
- Added `firebase_app_distribution.sh` script to automate APK distribution to Firebase App Distribution.
- The script builds the APK, prompts for group name and release notes, then uploads it to Firebase.
- The script reads the `appId` from `firebase_options.dart` to use it in firebase distribution.
- Included error handling for missing `firebase_options.dart` and empty group name.
- Included a default release notes in case user doesn't enter any.
…Actions

- Added a workflow to distribute the production Android APK to Firebase App Distribution.
- Installed the Firebase CLI in the workflow.
- Extracted the Firebase App ID from `firebase_options.dart`.
- Configured distribution to the "7Span-Internal" group.
- Included the commit message as release notes.
- Set up `FIREBASE_TOKEN` as an environment variable.
- Added `fix/improved-pagination` to the list of branches that trigger the workflow.
- Removed the step that extracted the Firebase App ID from `firebase_options.dart` in the CI workflow.
- Replaced the extracted App ID with a `FIREBASE_APP_ID` secret for distributing the APK to Firebase App Distribution.
- Removed the `fix/improved-pagination` branch from the list of branches that trigger the workflow.
- Added a new job step to upload iOS IPA files to App Store Connect.
- Created a new step to build iOS IPA.
- Created a new step to store the App Store Connect API key file.
- Updated the Firebase App Distribution script to use the `app-prod-release.apk` file.
- Added the `fix/improved-pagination` branch to the list of branches that trigger the workflow.
- Added `--flavor prod` to the `flutter build ipa` command for building the iOS IPA.
- Modified project settings to update `PRODUCT_BUNDLE_IDENTIFIER` to "com.flutter.boilerplate.demo.app".
- Added empty `inputPaths` and `outputPaths` for Copy Pods Resources and Embed Pods Frameworks.
- Updated app icons for the app
- Fixed `PRODUCT_BUNDLE_IDENTIFIER` in the project file to be consistent.
- Updated project files to remove unused input and output paths.
- Added `ExportOptions.plist` for configuring iOS app store export options.
- Updated iOS build command in `main.yml` to use the new `ExportOptions.plist` file.
- Commented out the code that related to the Android in `main.yml`.
- Removed `fix/improved-pagination` branch from the trigger events.
- Uncommented and reordered steps for building and distributing Android APK.
- Added steps for accepting Android SDK licenses and installing NDK.
- Added steps for building Android APK and distributing it via Firebase.
- Added step for Upload the build Artifact.
- Removed iOS TestFlight upload steps.
@bhavik-m-7span bhavik-m-7span self-assigned this Apr 29, 2025
@bhavik-m-7span bhavik-m-7span added the enhancement New feature or request label Apr 29, 2025
Copy link
Collaborator

@cavin-7span cavin-7span left a comment

Choose a reason for hiding this comment

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

Could you please fix the mentioned changes

- Moved `pageSize` from `ApiEndpoints` to `ApiConstant`.
- Updated all references of page size to use `ApiConstant.pageSize`.
- Added `ApiConstant` into `api_client` package export.
@cavin-7span cavin-7span merged commit 493b1cb into main Apr 30, 2025
@cavin-7span cavin-7span deleted the fix/improved-pagination branch April 30, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve page count logic and include Firebase Distribution in Github workflow
2 participants