Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Account_sign_up
Browse files Browse the repository at this point in the history
  • Loading branch information
Illya Tsai authored and Illya Tsai committed May 6, 2024
2 parents adc36ac + 711abee commit 353316c
Show file tree
Hide file tree
Showing 49 changed files with 404 additions and 136 deletions.
104 changes: 104 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,110 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-04-26

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_localizations` - `v1.3.0`](#deriv_localizations---v130)
- [`deriv_auth` - `v6.4.2`](#deriv_auth---v642)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `deriv_auth` - `v6.4.2`

---

#### `deriv_localizations` - `v1.3.0`

- **FEAT**(deriv_localization): Update localization string for deriv_auth ([#571](https://github.com/regentmarkets/flutter-deriv-packages/issues/571)). ([d2d76902](https://github.com/regentmarkets/flutter-deriv-packages/commit/d2d769023b651419270842d450a56a4bbd264327))


## 2024-04-24

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_auth` - `v6.4.1`](#deriv_auth---v641)

---

#### `deriv_auth` - `v6.4.1`

- **FIX**(deriv_auth): Update settings page navigation in auth flow with callback ([#567](https://github.com/regentmarkets/flutter-deriv-packages/issues/567)). ([53857baf](https://github.com/regentmarkets/flutter-deriv-packages/commit/53857baf66ecc870e8a1452663c564b8ee57837a))


## 2024-04-22

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_auth` - `v6.4.0`](#deriv_auth---v640)

---

#### `deriv_auth` - `v6.4.0`

- **FEAT**(deriv_auth): [P2PS-2679] add widget keys to auth components ([#565](https://github.com/regentmarkets/flutter-deriv-packages/issues/565)). ([e7bc54b4](https://github.com/regentmarkets/flutter-deriv-packages/commit/e7bc54b4be3d80236c83f1fecbe6f012f8759690))


## 2024-04-22

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_web_view` - `v0.2.2+1`](#deriv_web_view---v0221)
- [`deriv_auth` - `v6.3.8`](#deriv_auth---v638)
- [`deriv_ui` - `v0.0.7+3`](#deriv_ui---v0073)
- [`deriv_widgetbook` - `v0.0.2+3`](#deriv_widgetbook---v0023)
- [`deriv_language_selector` - `v0.0.2+1`](#deriv_language_selector---v0021)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `deriv_auth` - `v6.3.8`
- `deriv_ui` - `v0.0.7+3`
- `deriv_widgetbook` - `v0.0.2+3`
- `deriv_language_selector` - `v0.0.2+1`

---

#### `deriv_web_view` - `v0.2.2+1`

- **FIX**(deriv_web_view): update PTA model ([#557](https://github.com/regentmarkets/flutter-deriv-packages/issues/557)). ([49583f82](https://github.com/regentmarkets/flutter-deriv-packages/commit/49583f823fdac9c3ec3a85529fad9ab9f6784c67))


## 2024-04-03

### Changes
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ This repository contains private packages & plugins that are used by the company

## Using the packages

Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.3.7)`. To use the package, add the following to your pubspec.yaml file:
Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.4.2)`. To use the package, add the following to your pubspec.yaml file:


```yaml
deriv_ui:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+2 #your prefered version
ref: deriv_ui-v0.0.7+3 #your prefered version
```
## Packages
| Name | Description | Version |
| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [analytics](./packages/analytics) | Used to collect and send analytical information to 'Firebase' and 'Segment'. | [v1.0.2](./packages/analytics/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.3.7 ](./packages/deriv_auth/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.4.2 ](./packages/deriv_auth/CHANGELOG.md) |
| [deriv_banner](./packages/deriv_banner) | A widget to show banner in apps. | [v0.0.1+1](./packages/deriv_banner/CHANGELOG.md) |
| [deriv_bloc_manager](./packages/deriv_bloc_manager) | Provides some tools to manage blocs. | [v0.0.1](./packages/deriv_bloc_manager/CHANGELOG.md) |
| [deriv_datadog](./packages/deriv_datadog) | A package that helps you monitor the performance and user interactions of your Flutter app by sending data to Datadog. | [v0.0.1](./packages/deriv_datadog/CHANGELOG.md) |
Expand All @@ -31,18 +31,18 @@ deriv_ui:
| [deriv_http_client](./packages/deriv_http_client) | A package that provides a wrapper for http package. | [v2.0.0](./packages/deriv_http_client/CHANGELOG.md) |
| [deriv_lint](./packages/deriv_lint) | A Dart package that provides lint rules for Dart and Flutter. | [v1.0.0](./packages/deriv_lint/CHANGELOG.md) |
| [deriv_live_chat](./packages/deriv_live_chat) | A plugin for live chat SDK support to dart. | [v0.0.1+1](./packages/deriv_live_chat/CHANGELOG.md) |
| [deriv_language_selector](./packages/deriv_language_selector) | A package to handle language change of the app. | [v0.0.1+2](./packages/deriv_language_selector/CHANGELOG.md) |
| [deriv_localizations](./packages/deriv_localizations) | A Package that contains the localization arb(coming from Crowdin) and dart generated files for flutter_deriv_packages. | [v1.1.1](./packages/deriv_localizations/CHANGELOG.md) | | [v1.2.0](./packages/deriv_localizations/CHANGELOG.md) |
| [deriv_language_selector](./packages/deriv_language_selector) | A package to handle language change of the app. | [v0.0.2+1](./packages/deriv_language_selector/CHANGELOG.md) |
| [deriv_localizations](./packages/deriv_localizations) | A Package that contains the localization arb(coming from Crowdin) and dart generated files for flutter_deriv_packages. | [v1.1.1](./packages/deriv_localizations/CHANGELOG.md) | | [v1.3.0](./packages/deriv_localizations/CHANGELOG.md) |
| [deriv_numpad](./packages/deriv_numpad) | Number Pad Widget for number input. | [v1.1.3](./packages/deriv_numpad/CHANGELOG.md) |
| [deriv_rudderstack](./packages/deriv_rudderstack) | A plugin that add RudderStack SDK support to Flutter. | [v1.1.0](./packages/deriv_rudderstack/CHANGELOG.md) |
| [deriv_store_launcher](./packages/deriv_store_launcher) | A plugin to launch app stores base on platform and manufacturer. | [v0.0.1+1](./packages/deriv_store_launcher/CHANGELOG.md) |
| [deriv_technical_analysis](./packages/deriv_technical_analysis) | A Dart package for Technical Analysis. | [v0.0.1](./packages/deriv_technical_analysis/CHANGELOG.md) |
| [deriv_theme](./packages/deriv_theme) | A package that contains the theme used by Deriv products. | [v2.4.0](./packages/deriv_theme/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.0.7+2](./packages/deriv_ui/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.0.7+3](./packages/deriv_ui/CHANGELOG.md) |
| [deriv_utilities](./packages/deriv_utilities) | A package that contains the utilities including helper functions, mixins, and extensions. | [v1.0.0](./packages/deriv_utilities/CHANGELOG.md) |
| [deriv_websocket](./packages/deriv_web_socket_client) | A package that provides a easy to use websocket client. | [v1.0.1](./packages/deriv_web_socket_client/CHANGELOG.md) |
| [deriv_web_view](./packages/deriv_web_view) | Deriv web view package. | [v0.2.2](./packages/deriv_web_view/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) |Storybook for Deriv UI Widgets and Components | [v0.0.2+2](./packages/deriv_widgetbook/CHANGELOG.md) |
| [deriv_web_view](./packages/deriv_web_view) | Deriv web view package. | [v0.2.2+1](./packages/deriv_web_view/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) |Storybook for Deriv UI Widgets and Components | [v0.0.2+3](./packages/deriv_widgetbook/CHANGELOG.md) |
| [form_builder](./packages/form_builder) | A simpler and cleaner way to create, validate and submit forms. | [v1.0.0+1](./packages/form_builder/CHANGELOG.md) |
| [update_checker](./packages/update_checker) | Check and retrieve update information from the server for the given package. | [v1.2.2](./packages/update_checker/CHANGELOG.md) |
| [deriv_feature_flag](./packages/deriv_feature_flag) | A package to provide feature flag functionality for apps. | [v0.1.0+1](./packages/deriv_feature_flag/CHANGELOG.md) |
Expand Down
3 changes: 3 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ scripts:
packageFilters:
dirExists:
- test
ignore:
# Ignore until we have a proper test.
- "deriv_feature_flag"
16 changes: 16 additions & 0 deletions packages/deriv_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## 6.4.2

- Update a dependency to the latest release.

## 6.4.1

- **FIX**(deriv_auth): Update settings page navigation in auth flow with callback ([#567](https://github.com/regentmarkets/flutter-deriv-packages/issues/567)). ([53857baf](https://github.com/regentmarkets/flutter-deriv-packages/commit/53857baf66ecc870e8a1452663c564b8ee57837a))

## 6.4.0

- **FEAT**(deriv_auth): [P2PS-2679] add widget keys to auth components ([#565](https://github.com/regentmarkets/flutter-deriv-packages/issues/565)). ([e7bc54b4](https://github.com/regentmarkets/flutter-deriv-packages/commit/e7bc54b4be3d80236c83f1fecbe6f012f8759690))

## 6.3.8

- Update a dependency to the latest release.

## 6.3.7

- Update a dependency to the latest release.
Expand Down
10 changes: 10 additions & 0 deletions packages/deriv_auth/docs/deriv_auth_layouts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Deriv Auth Layouts

### - Get Started Flow

- **Get Started Layout**
``` dart
DerivGetStartedLayout(
Expand All @@ -13,10 +14,17 @@
onSignupTapped: () {},
);
```
### - Login Flow
- **Login Layout**
``` dart
DerivLoginLayout(
titleKey: Key('title key'),
emailTextFieldKey: Key('email text field key'),
passwordTextFieldKey: Key('password text field key'),
forgotPasswordButtonKey: Key('forgot password button key'),
loginButtonKey: Key('login button key'),
welcomeLabel: 'Welcome back!',
greetingLabel:
'Log in to your Deriv account to start trading and investing.',
Expand Down Expand Up @@ -55,6 +63,7 @@
```
### - Signup Flow
- **Signup Layout**
``` dart
DerivSignupLayout(
Expand Down Expand Up @@ -113,6 +122,7 @@
residence: 'residence',
);
```
### - Reset Password Flow
- **Reset Password Layout**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DerivGetStartedLayout extends StatefulWidget {
final VoidCallback onSignupTapped;

/// Navigation to be called when screen is tapped seven times.
final VoidCallback onTapNavigation;
final Function(BuildContext context) onTapNavigation;

@override
State<DerivGetStartedLayout> createState() => _DerivGetStartedLayoutState();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';

import 'package:deriv_auth/deriv_auth.dart';
import 'package:deriv_theme/deriv_theme.dart';
import 'package:deriv_ui/deriv_ui.dart';
Expand All @@ -24,6 +25,11 @@ class DerivLoginLayout extends StatefulWidget {
this.authErrorStateHandler,
this.onLoginError,
this.onLoginTapped,
this.titleKey,
this.emailTextFieldKey,
this.passwordTextFieldKey,
this.forgotPasswordButtonKey,
this.loginButtonKey,
Key? key,
}) : super(key: key);

Expand Down Expand Up @@ -74,6 +80,21 @@ class DerivLoginLayout extends StatefulWidget {
/// Callback for web view error.
final Function(String) onWebViewError;

/// Widget key for title.
final Key? titleKey;

/// Widget key for email text box.
final Key? emailTextFieldKey;

/// Widget key for password text box.
final Key? passwordTextFieldKey;

/// Widget key for forgot password button.
final Key? forgotPasswordButtonKey;

/// Widget key for login button button.
final Key? loginButtonKey;

@override
State<DerivLoginLayout> createState() => _DerivLoginLayoutState();
}
Expand Down Expand Up @@ -102,6 +123,7 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {
elevation: ThemeProvider.zeroMargin,
title: Text(
context.derivAuthLocalization.labelLogIn,
key: widget.titleKey,
style: TextStyles.title,
),
backgroundColor: context.theme.colors.secondary,
Expand Down Expand Up @@ -180,6 +202,7 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {

List<Widget> _buildTextFields({required bool isEnabled}) => <Widget>[
BaseTextField(
key: widget.emailTextFieldKey,
semanticLabel: SemanticsLabels.loginEmailFieldSemantic,
controller: _emailController,
focusNode: _emailFocusNode,
Expand All @@ -195,6 +218,7 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {
),
const SizedBox(height: ThemeProvider.margin32),
BaseTextField(
key: widget.passwordTextFieldKey,
semanticLabel: SemanticsLabels.loginPasswordFieldSemantic,
controller: _passwordController,
focusNode: _passwordFocusNode,
Expand Down Expand Up @@ -222,6 +246,7 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {
Widget _buildForgotPassButton() => Align(
alignment: Alignment.centerRight,
child: InkWell(
key: widget.forgotPasswordButtonKey,
onTap: widget.onResetPassTapped,
child: Text(
context.derivAuthLocalization.actionForgotPassword,
Expand All @@ -236,6 +261,7 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {
Widget _buildLoginButton() => BlocBuilder<DerivAuthCubit, DerivAuthState>(
bloc: authCubit,
builder: (BuildContext context, DerivAuthState state) => ElevatedButton(
key: widget.loginButtonKey,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
context.theme.colors.coral.withOpacity(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'package:flutter/material.dart';

/// Setting page model
class SettingPageModel {
/// Constructor [SettingPageModel]
Expand All @@ -7,6 +9,7 @@ class SettingPageModel {
required this.endpoint,
required this.saveValues,
required this.updateFlavorConfigs,
this.settingsPageNavigation,
});

/// Setting page App label
Expand All @@ -24,4 +27,7 @@ class SettingPageModel {
/// Update flavor configurations
final Function({required String endpoint, required String appId})
updateFlavorConfigs;

/// Settings page navigation
final Function(BuildContext context)? settingsPageNavigation;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ class GetStartedPage extends StatelessWidget {
builder: (BuildContext context) => const SignupPage(),
),
),
onTapNavigation: () {
Navigator.push(
context,
MaterialPageRoute<Widget>(
builder: (BuildContext context) => const SettingsPage(),
),
);
},
onTapNavigation:
AuthData().data.settingPageModel.settingsPageNavigation ??
(BuildContext context) {
Navigator.push(
context,
MaterialPageRoute<Widget>(
builder: (BuildContext context) => const SettingsPage(),
),
);
},
);
}
Loading

0 comments on commit 353316c

Please sign in to comment.