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

Members List and Member profile #25

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

isabelcosta
Copy link
Member

@isabelcosta isabelcosta commented Aug 5, 2018

Description

I created Members list and Member Profile.

Fixes #6
Fixes #19

Members screen without the placeholders for the pictures:

image

Members Profile without picture:

image

Type of Change:

  • Code

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Describe the tests you ran to verify your changes. Provide instructions or GIFs so we can reproduce. List any relevant details for your test.

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings

@isabelcosta isabelcosta force-pushed the members-list branch 4 times, most recently from 4f6440f to cb5d306 Compare August 6, 2018 01:06
@isabelcosta
Copy link
Member Author

@roopalJazz @m-murad there's only one Codacy warning left regarding casting the activity that created a fragment. I cannot find a way to bypass that. other than that, the PR is ready to be reviewed. cc @Dilu9218

Copy link
Contributor

@m-murad m-murad left a comment

Choose a reason for hiding this comment

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

Will request some more changes once I review the code in an IDE

/**
* @return a pointer to an initialised [UserService]
*/
fun getUserService() = userService
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep the getUserService() and getAuthService() similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can I make getAuthService like getUserService? use = instead of { } ? @m-murad

@@ -25,6 +25,7 @@
<activity android:name=".view.activities.SignUpActivity"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".view.activities.MainActivity" />
<activity android:name=".view.activities.MemberProfileActivity" />
</application>

</manifest>
Copy link
Contributor

Choose a reason for hiding this comment

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

Blank line

* @return an Observable of [UserResponse]
*/
fun getUser(userId: Int): Observable<UserResponse> {
return apiManager.getUserService().getOtherUser(userId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Change getOtherUser(userId) to getUserById(userId)

* This will call the getOtherUser method of UserService interface
* @return an Observable of [UserResponse]
*/
fun getUser(userId: Int): Observable<UserResponse> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Change getUser(userId: Int) to getUserById(userId: Int)

* @return an observable instance of the [UserResponse]
*/
@GET("users/{userId}")
fun getOtherUser(@Path("userId") userId: Int): Observable<UserResponse>
Copy link
Contributor

Choose a reason for hiding this comment

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

change to getUserById()

@isabelcosta
Copy link
Member Author

I'll address all of your comments when you finish your review @m-murad ok?

*/
class MembersAdapter (
private val usersList: List<UserResponse>,
private val openDetailFunction: (movieDetailId: Int) -> Unit
Copy link
Member Author

Choose a reason for hiding this comment

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

copy paste mistake, possibly change movieDetailId to memberId

@@ -5,6 +5,8 @@
<string name="sign_up">Sign Up</string>
<string name="logging_in">Logging in…</string>
<string name="signing_up">Signing up…</string>
<string name="getting_users">Fetching users…</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

Change getting_users to fetching_users

android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
Copy link
Contributor

Choose a reason for hiding this comment

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

Data that is not available via the API should be hidden.

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename this file to list_member_item.xml

app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />

<TextView
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this as a pair of 2 textViews. One having the constant text "Username : " and another with the variable text name.

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 created a function that make the initial text bold before the ":" and the rest a normal value or "----".
I'm using one text view only to avoid this following situation:
image

Still you want me to use two different text views and have the situation on the right? @m-murad

@isabelcosta
Copy link
Member Author

Members screen without the placeholders for the pictures:

image

Members Profile without picture:

image

I know the UI has to be improved a loooot, this is focusing on the funcionality code

@isabelcosta
Copy link
Member Author

@roopalJazz can you please review this?

@isabelcosta
Copy link
Member Author

This is before when I had images placeholders. I removed the images, because we do not have api for getting image yet

Members List

image

Member Profile

image

image

@m-murad m-murad merged commit f0a4a6b into anitab-org:gsoc18-code Aug 10, 2018
@isabelcosta
Copy link
Member Author

This is such a relief!

@isabelcosta isabelcosta added Program: GSOC Related to work completed during the Google Summer of Code Program. and removed Program: GSOC Related to work completed during the Google Summer of Code Program. labels Aug 12, 2018
@isabelcosta isabelcosta deleted the members-list branch February 25, 2020 18:04
m-murad added a commit that referenced this pull request Feb 26, 2020
Members List and Member profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: GSOC Related to work completed during the Google Summer of Code Program.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants