-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/auth limits and auth refactor #141
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
Closed
Closed
Conversation
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
- Define LimitAction enum for possible user actions when limit is exceeded - Create base UserLimitState class and sealed subclasses for different states - Implement UserLimitInitial, UserLimitLoading, UserLimitSuccess, UserLimitFailure, and LimitExceeded states - Add necessary properties and methods to state classes
- Add UserLimitBloc and related events to monitor and manage user preferences limits - Define LimitType enum to categorize different user preference limits - Implement CheckLimitRequested event to verify if a user has exceeded a specific limit - Create LimitActionTaken event to track user actions related to limit prompts
- Add UserLimitBloc to handle user preference limits - Implement logic to check if user has exceeded limits for followed items or saved headlines - Emit states to guide UI prompts for account linking or subscription upgrade - Handle different user roles and remote configuration settings
- Add LimitExceededPage widget to handle content preference limits - Implement logic for different limit types and user roles - Include actions for account linking and premium upgrade - Use localization for all displayed text - Ensure responsive design with proper padding and sizing
- Remove unused parameters and comments - Use localizations for headlines and subheadlines - Remove conditional linking context and close button - Adjust UI elements based on simplified requirements
… context - Remove isLinkingContext parameter from RequestCodePage - Remove conditional navigation based on linking context - Remove demo environment specific code - Simplify AppBar leading button behavior - Update successful code request navigation
- Create a new modal bottom sheet page for anonymous users to link their account to an email address - Implement the account linking process using the existing AuthenticationBloc - Add UI elements for email input, cooldown timer, and submit button - Display success and error messages to the user - Localize all text content using the AppLocalizations
- Export 'limit_exceeded_page.dart' in the status view file
- Introduce UserLimitService for checking user preference limits - Define LimitType, LimitAction, and LimitExceeded classes - Implement logic to determine if a user has exceeded limits based on their role and remote config settings - Add methods to check limits for followed topics, sources, countries, and saved headlines
- Remove the LimitAction enum from user_limit_state.dart - This enum was not being used in the current implementation - Reduces unnecessary code and potential confusion
…riggered event - Remove LimitType enum from user_limit_event.dart - Add new LimitExceededTriggered event to handle limit exceeded scenarios - Update existing events to fit the new structure
- Remove check limit logic and associated dependencies - Implement handling for pre-checked limit notifications - Streamline bloc to focus on UI presentation logic
- Integrate UserLimitService to check limits before following entities - Add UserLimitBloc to handle limit exceeded scenarios - Update EntityDetailsBloc to listen to AppBloc for preference changes - Modify toggle follow logic to enforce limits and handle unfollow actions - Add error handling for limit checks and entity type support
- Add new event class EntityDetailsToggleFollowRequestedWithLimitCheck - This event will be used to toggle the "follow" status of the currently loaded entity, including a limit check
- Add new EntityDetailsLimitExceeded state to handle follow limit exceed scenarios - Include LimitExceeded object in the new state to provide details about the exceeded limit
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.
Status
READY/IN DEVELOPMENT/HOLD
Description
Type of Change