-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: bring back current login flow and add a feature flag for enterprise login [WPB-15543] #3817
Conversation
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
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.
Great job!! looks good to me and can make us progress without waiting for BE.
Just raised a question, if we can make the initial destination dynamic as it is now, but based on the API version instead of compile time. Not to solve now, but problem for the near future.
navArgsDelegate = LoginNavArgs::class | ||
) | ||
@Composable | ||
// this is a temporary solution because annotation argument "start" must be a compile-time constant |
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.
Good trick !
Question: can we maintain this in the future ? Mainly because we will need to resolve this not by compile time, but with API version based. If the backend is v8+ then new login flow. If not, the old/current flow.
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.
Oh, so in short: yes, we can do that!
In that case we would need to create a small dedicated ViewModel
that uses AuthServerConfigProvider
and inject it into composable to determine the login flow version to use and this way we create a screen destination that works as a login flow "chooser", but we would need to create such composable "chooser" for the "welcome" and "login" screen (sometimes we directly open "login" screen, e.g. when migration requires the user to log in).
Quality Gate passedIssues Measures |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
We started implementing new enterprise login flow by modifying files from current one, but to make sure we keep having working login flow we need to keep current one intact and implement new one next to it so that it will be easy to switch to new one once everything is implemented and tested.
Classes from current login flow:
WelcomeScreen
,WelcomeScreenState
,LoginScreen
are reverted to their original forms,LoginErrorDialog
is extracted to separate file so that it can be reused more easily.Feature flag
enterprise_login_enabled
is created in this PR to be able to switch between old and new login flow.PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.