You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by sagar15795 <gi...@git.apache.org> on 2016/08/03 06:37:22 UTC

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

GitHub user sagar15795 opened a pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25

    Redesign Login layout and working 

    I have implemented the Login Detail layout with functionality.
    
    I have  also converted flash screen fragment according to MVP.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sagar15795/incubator-taverna-mobile Login

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-taverna-mobile/pull/25.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit 7c013be8f1a4f490e2a55fc414fe92a45ef37e4f
Author: Sagar <ku...@gmail.com>
Date:   2016-07-27T17:58:44Z

    add login Endpoint in API endpoint and TavernaService

commit 6a86cee6790383b35312c90182e1508a74ab1406
Author: Sagar <ku...@gmail.com>
Date:   2016-07-27T18:13:13Z

    add login method in data manager

commit bba14cae2cb72dd1d23295fb16aaca014f9ce63d
Author: Sagar <ku...@gmail.com>
Date:   2016-07-29T18:24:56Z

    redesign login layout

commit adbaaa0a53fd7cdca67dfa562b3c5cfb10d8cf49
Author: Sagar <ku...@gmail.com>
Date:   2016-07-30T09:21:31Z

    move loginActivity file according to  mvp

commit bda66e8170718f2eb72cc8efa72756b4ee9bb837
Author: Sagar <ku...@gmail.com>
Date:   2016-07-30T09:22:42Z

    initial  loginfragment with mvp and presenter class

commit 679e84f160adfdc60f61d1ccfdb33af2a215f681
Author: Sagar <ku...@gmail.com>
Date:   2016-07-30T09:23:08Z

    add string

commit bb4d8060201d7548f5f06b2828f637a3c63c39c4
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T06:54:43Z

    move to dashboard on successful login

commit 391d3d741f3d3a7668c7b99ae3cb9b0f8c73dd67
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T07:54:07Z

    add preference helper to save logged in user details

commit 1b18a1c5342e706b2fad6877bfbd6853c95974a7
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T09:53:13Z

    add preference helper in DataManager

commit aae7e22f10fa268aeed1026b39979cf224ed9f86
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T10:44:23Z

    wire preferenceHelper with UI and DataManager

commit 7eddedb66b8d4ed6cbb4de7d417a73e80c9db0de
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T11:07:55Z

    remove unused functions

commit 329e04e437474f03aa991abb5cf98292221a16f5
Author: Sagar <ku...@gmail.com>
Date:   2016-08-01T11:09:26Z

    add logged in flag from preference helper

commit 45edde09a307205d4ae36650ee7531cfaadc39aa
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T07:09:00Z

    remove rx leak error

commit dd91a922414b1ccfd851bb1c3fc5088e77f452be
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T07:34:04Z

    add method to get login flag

commit bd09d435921a069a560ecd19867da7350fa5be0e
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T17:14:07Z

    redesign flash screen according to  mvp structure

commit 46e56b948f3d265afef0855e9a689130dbf10bc9
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T17:49:41Z

    add remain login feature

commit f1de3b1f577f4396a90b9109cc4b3e25deb2989b
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:03:04Z

    add progress dialog

commit 0657ebe97fad6fad532430eefb07bf8f185f61e9
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:07:44Z

    fix  remain logged-in checkbox true by default

commit 002c567291a6c621105a2c435a8d73cc48431035
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:09:03Z

    set input type to email address

commit 709ddca30726b92297bff7bb687c127b3b19d9f5
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:11:58Z

    Merge branch 'master' into Login
    
    # Conflicts:
    #	app/src/main/java/org/apache/taverna/mobile/activities/LoginActivity.java

commit 2c68a32eb0ef61c7abf4f2bbd1d657a8cf801845
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:18:58Z

    add licence header

commit 8e0ed8c29918ef2a8c7f0908b796f1176724d2b4
Author: Sagar <ku...@gmail.com>
Date:   2016-08-02T18:19:24Z

    remove unused method

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73474333
  
    --- Diff: app/src/main/res/values/strings.xml ---
    @@ -80,7 +80,7 @@ limitations under the License.
         <string name="loading">Loading details</string>
         <string name="loadworkflows">Loading Workflows</string>
         <string name="fetchrun">Fetching run components </string>
    -    <string name="keeplogin">Remain Logged-in</string>
    +    <string name="keepLogin">Remain Logged-in</string>
    --- End diff --
    
    do it also


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73473313
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginActivity.java ---
    @@ -0,0 +1,43 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.ui.login;
    +
    +import android.os.Bundle;
    +import android.support.v7.app.AppCompatActivity;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.utils.ActivityUtils;
    +
    +
    +public class LoginActivity extends AppCompatActivity {
    +    private static final String TAG = "LoginActivity";
    +
    +    @Override
    +    protected void onCreate(Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +        setContentView(R.layout.activity_login);
    +
    +        if (savedInstanceState == null) {
    +            ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), new LoginFragment(), R
    --- End diff --
    
    Do not call Default constructor, Use newInstance().


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73642367
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/data/local/PreferencesHelper.java ---
    @@ -0,0 +1,172 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.data.local;
    +
    +
    +import android.content.Context;
    +import android.content.SharedPreferences;
    +
    +import org.apache.taverna.mobile.data.model.User;
    +
    +import rx.Observable;
    +import rx.functions.Func0;
    +
    +public class PreferencesHelper {
    --- End diff --
    
    This is not good way make Preference Manager.
    Here you have made method for saving user details rather than make method for saving String, int , Boolean value and pass the Key and Value that's the way of doing things.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73474310
  
    --- Diff: app/src/main/res/values/strings.xml ---
    @@ -28,10 +28,10 @@ limitations under the License.
             <item>Date Last Run</item>
         </array>
         <string name="hello_blank_fragment"> About Workflow </string>
    -    <string name="Logininfo">Login to your Account (MyExperiment)</string>
    +    <string name="LoginInfo">MyExperiment Login</string>
         <string name="loginusername">Email or Username</string>
         <string name="loginpassword">Password</string>
    -    <string name="loginbutton">Login</string>
    +    <string name="bLogin">Login</string>
    --- End diff --
    
    Do not use capital letters here. change to lower case and do not use ambiguous naming


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73474856
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginFragment.java ---
    @@ -0,0 +1,255 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.ui.login;
    +
    +
    +import android.app.ProgressDialog;
    +import android.content.Intent;
    +import android.os.Bundle;
    +import android.support.annotation.Nullable;
    +import android.support.design.widget.Snackbar;
    +import android.support.design.widget.TextInputLayout;
    +import android.support.v4.app.Fragment;
    +import android.text.Editable;
    +import android.text.TextWatcher;
    +import android.view.LayoutInflater;
    +import android.view.View;
    +import android.view.ViewGroup;
    +import android.view.WindowManager;
    +import android.widget.CheckBox;
    +import android.widget.EditText;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.activities.DashboardMainActivity;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.data.local.PreferencesHelper;
    +import org.apache.taverna.mobile.utils.ConnectionInfo;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +import butterknife.OnClick;
    +
    +public class LoginFragment extends Fragment implements LoginMvpView, View.OnFocusChangeListener {
    +
    +    @BindView(R.id.etEmail)
    +    EditText mEditTextEmail;
    +
    +    @BindView(R.id.etPassword)
    +    EditText mEditTextPassword;
    +
    +    @BindView(R.id.input_layout_email)
    +    TextInputLayout mTextInputEmail;
    +
    +    @BindView(R.id.input_layout_password)
    +    TextInputLayout mTextInputPassword;
    +
    +    @BindView(R.id.cbRemember)
    +    CheckBox mCheckBoxRemember;
    +
    +    private DataManager dataManager;
    +    private LoginPresenter mLoginPresenter;
    +    private ConnectionInfo mConnectionInfo;
    +
    +    private ProgressDialog progressDialog;
    +
    +    @Override
    +    public void onCreate(Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +
    +
    +        dataManager = new DataManager(new PreferencesHelper(getContext()));
    +        mLoginPresenter = new LoginPresenter(dataManager);
    +        mConnectionInfo = new ConnectionInfo(getContext());
    --- End diff --
    
    Make isConnectingToInternet static and call directly. No need to make object


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73474093
  
    --- Diff: app/src/main/res/values/strings.xml ---
    @@ -28,10 +28,10 @@ limitations under the License.
             <item>Date Last Run</item>
         </array>
         <string name="hello_blank_fragment"> About Workflow </string>
    -    <string name="Logininfo">Login to your Account (MyExperiment)</string>
    +    <string name="LoginInfo">MyExperiment Login</string>
    --- End diff --
    
    change to login_info


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by therajanmaurya <gi...@git.apache.org>.
Github user therajanmaurya commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/25#discussion_r73473623
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/login/LoginMvpView.java ---
    @@ -0,0 +1,33 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.taverna.mobile.ui.login;
    +
    +
    +import org.apache.taverna.mobile.ui.base.MvpView;
    +
    +public interface LoginMvpView  extends MvpView {
    +
    +    void moveToWorkflowList();
    --- End diff --
    
    Ambiguous naming. change like showDashbarodActivity()


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-taverna-mobile pull request #25: Redesign Login layout and working...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-taverna-mobile/pull/25


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---