Skip to content
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: adding authentication page UI based on Figma #12

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

sumit-158
Copy link
Member

@sumit-158 sumit-158 commented Jun 17, 2022

What

  • Adding the login/register page UI design based on the Figma

Screenshot

image

Fixes bug(s)

Part of

@sumit-158 sumit-158 requested review from alexgarel and teolemon June 17, 2022 10:16
@alexgarel
Copy link
Member

@g123k can you review this, or ask someone knowing dart to review ?

For more context you can ask @sumit-158

Copy link
Contributor

@g123k g123k left a comment

Choose a reason for hiding this comment

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

Some comments about your code.

crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
' Sign In to the\nCommunity Portal',
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you plan to use a translation service?
Hardcoded sentences are not a good behavior

Copy link
Member Author

Choose a reason for hiding this comment

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

@g123k suggestions please.

Copy link
Member

Choose a reason for hiding this comment

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

Hello Sumit

You can have a look here
https://docs.flutter.dev/development/accessibility-and-localization/internationalization
Hope it might help you out

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @AshAman999

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you plan to use a translation service?
currently not , might be in future updates .

Copy link
Contributor

Choose a reason for hiding this comment

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

Please ask @teolemon how to use Crowdin (the same as Smoothie)

Copy link
Member

Choose a reason for hiding this comment

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

It's as simple as tweaking the config file in the PR, with the path to the translation file (typically *.arb for flutter)

Copy link
Member

Choose a reason for hiding this comment

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

#25

client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
@sumit-158 sumit-158 requested a review from g123k June 18, 2022 12:45
@sumit-158
Copy link
Member Author

@g123k I have updated the requested changes can you please check it , if its ok can you approve it else maybe give some more suggestions :)

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

Heyy @sumit-158 good code in general, just one thing I noticed. You have a lot of hardcoded values, which tends to get hard to maintain or breaks some UI when doing some color changing for example.

It already started with some SizedBoxes with a height of 30 some with 40 and other ones with 50. Same goes for colors as g123k already pointed out. In smoothie we put them all in a central location.
The colors in a Theme which we give to the MaterialApp widget so that the colors are automatically selected by the underlying widgets. And we have a single file just with global constants for spaces and how round certain corners should be,

@@ -0,0 +1,187 @@
// ignore_for_file: prefer_const_constructors
Copy link
Member

Choose a reason for hiding this comment

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

Constant constructors are more performant

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 please remove this kind of line
It's there for a reason

@g123k
Copy link
Contributor

g123k commented Jun 22, 2022

@sumit-158 Could you share the Figma file please?
Some paddings looks weird on your screenshot

Copy link
Contributor

@g123k g123k left a comment

Choose a reason for hiding this comment

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

A few more comments @sumit-158
Feed free to ask questions if my comments are not well understandable.

In general:

  • Move all colors, dimensions… in a separated file
  • Use a translation service

client/lib/main.dart Outdated Show resolved Hide resolved
client/lib/main.dart Outdated Show resolved Hide resolved
@@ -0,0 +1,187 @@
// ignore_for_file: prefer_const_constructors
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 please remove this kind of line
It's there for a reason

client/lib/Screens/login/login_screen.dart Show resolved Hide resolved
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 30),
Copy link
Contributor

Choose a reason for hiding this comment

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

To have a consistency between all screens, could you store all dimensions in a separated file please?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you mark this as resolved, as the dimension is still hardcoded?

Copy link
Member Author

Choose a reason for hiding this comment

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

how I can put in a centralized file? Is creating a const for appappding would be good in theme_constants file?

client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
' Sign In to the\nCommunity Portal',
Copy link
Contributor

Choose a reason for hiding this comment

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

Please ask @teolemon how to use Crowdin (the same as Smoothie)

client/lib/Screens/login/login_screen.dart Outdated Show resolved Hide resolved
client/lib/Screens/login/login_screen.dart Show resolved Hide resolved
@g123k
Copy link
Contributor

g123k commented Jun 22, 2022

Also please develop in a fork of this repo, not directly in it.

@g123k g123k changed the base branch from main to dev June 22, 2022 08:26
@sumit-158
Copy link
Member Author

@sumit-158 Could you share the Figma file please? Some paddings looks weird on your screenshot

https://www.figma.com/file/AFo8ZYiNoom0o2Rakzg7vd/Community-portal-(OFF-version)?node-id=0%3A1

@sumit-158 sumit-158 requested a review from g123k June 23, 2022 10:56
@g123k
Copy link
Contributor

g123k commented Jun 26, 2022

By simplify resizing the window, I have an Overflow:
You should have a responsive design stating that if there is not enough space, the login form should go below the "Welcome" part

Screenshot 2022-06-26 at 14 08 44

@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView(
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a ListView for only two items is not recommanded.
Instead you should a SingleChildScrollView + Flex (which can be horizontal/vertical according to the space available)

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't change the listview, but it is responsive now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please show me your code without the ListView please.
It should work without any issue here

Copy link
Member Author

Choose a reason for hiding this comment

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

image

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 30),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you mark this as resolved, as the dimension is still hardcoded?

client/lib/Screens/login/login_screen.dart Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

6 participants