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

Sort menu redesign - Bottom Sheet Dialog #1242

Merged
merged 22 commits into from
Aug 9, 2017

Conversation

shobhitagarwal1612
Copy link
Contributor

Fixes #1039

Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

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

This looks and works really well for me in portrait! It disappears on screen rotation, though, and doesn't show all the way in landscape. This is on a Galaxy Tab A, Android 5.1.1.

@@ -28,6 +31,24 @@
"sq", "sw", "sw_KE", "ta", "th_TH", "tl", "tr", "uk", "ur",
"ur_PK", "vi", "zh", "zu"};

public static int getSortIcon(String sortBy) {
Copy link
Member

Choose a reason for hiding this comment

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

This constants class should really only hold true constants and no logic.

@shobhitagarwal1612
Copy link
Contributor Author

@lognaturel Please review

@lognaturel
Copy link
Member

Nice, @shobhitagarwal1612! For Edit Saved Form, there are a lot of options and so some scrolling is needed to see all of them. That wasn't immediately obvious to me. Is there some standard way of identifying that scrolling may be needed?

@mmarciniak90 can you please do a test pass? @grzesiek2010 would be great to get your eyes on it as well and see what you think. I also want to do another code review pass.

@lognaturel lognaturel dismissed their stale review July 17, 2017 16:58

I need to do another thorough code review.

@mmarciniak90
Copy link
Contributor

I noticed problems. Tested on Android 4.1, 4.2, 4.4, 5.1.
Use case:

  1. User is on 'Get Blank forms' view
  2. User opens sort dialog
  3. User changes device orientation and backs to vertical orientation
  4. User locks screen
  5. User unlocks screen
  6. User sees that sort dialog is opened second time

Other similar case:

  1. User is on 'Get Blank forms' view
  2. User opens sort dialog
  3. User changes device orientation and backs to vertical orientation
  4. User closes sort dialog
  5. User locks screen
  6. User unlocks screen
  7. Sort dialog appears

Those problems occur only on sort list with 2 options

@shobhitagarwal1612
Copy link
Contributor Author

@mmarciniak90 @lognaturel Please review

@lognaturel
Copy link
Member

@grzesiek2010 @mmarciniak90 @yanokwa I think this is really nice and I think it's pretty unlikely to confuse users. What would you think about merging it to master? That way we'd have a solution that better matches current design guidelines and that could stay the same through a more significant UI refresh.

@grzesiek2010
Copy link
Member

Samsung Galaxy Duos
Android 4.2.2

07-25 11:13:26.009 15937-15937/org.odk.collect.android E/WindowManager: android.view.WindowLeaked: Activity org.odk.collect.android.activities.InstanceChooserList has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{c29124d V.E..... R....... 0,0-1920,1005} that was originally added here
at android.view.ViewRootImpl.(ViewRootImpl.java:465)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:277)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.Dialog.show(Dialog.java:312)
at org.odk.collect.android.activities.AppListActivity.setupBottomSheet(AppListActivity.java:313)
at org.odk.collect.android.activities.AppListActivity.onResume(AppListActivity.java:136)
at org.odk.collect.android.activities.InstanceChooserList.onResume(InstanceChooserList.java:156)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1255)
at android.app.Activity.performResume(Activity.java:6412)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3392)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3434)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2772)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4471)
at android.app.ActivityThread.access$1000(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1455)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

I see this crash if i open the sort menu and change the device orientation. it works well only in Send Finalized Form and Delete Saved Form

I'm not able to reproduce this issue on Samsung Galaxy S4 Android 5.0.1

@grzesiek2010
Copy link
Member

Both icons are blue if i select one of available options (it work well by default after installation):
screenshot_2017-07-25-15-32-30
screenshot_2017-07-25-15-32-37

I noticed this issue also using Samsung Galaxy Duos Android 4.2.2 it looks ok on Samsung Galaxy S4 Android 5.0.1

@shobhitagarwal1612
Copy link
Contributor Author

@grzesiek2010 Fixed

@grzesiek2010
Copy link
Member

ok I'll look at it again.

@shobhitagarwal1612 shobhitagarwal1612 changed the base branch from ui-refresh to master July 26, 2017 04:05
@shobhitagarwal1612
Copy link
Contributor Author

@lognaturel I have switched the base branch to master

@grzesiek2010
Copy link
Member

The crash doesn't occur but the problem with blue icons is still visible.

@shobhitagarwal1612
Copy link
Contributor Author

@grzesiek2010 In which screen did you notice this?

@grzesiek2010
Copy link
Member

each one

@shobhitagarwal1612
Copy link
Contributor Author

@grzesiek2010 I am unable to reproduce the bug. I am testing on API 25 emulator. Can you please describe the steps to reproduce this bug?

@grzesiek2010
Copy link
Member

There aren't any special steps just:

  1. Open any list
  2. Open Sort menu
  3. Click on Name, A-Z or Name, Z-A
  4. Open the menu again and both icons (Name, A-Z or Name, Z-A) are blue.

The same if you use Date options. Everything is ok if you sort by status because there are two different icons I guess.

@shobhitagarwal1612
Copy link
Contributor Author

@grzesiek2010 Fixed. Please test again.

@grzesiek2010
Copy link
Member

@shobhitagarwal1612 @lognaturel I can confirm that both issues I found have been fixed. @mmarciniak90 will continue testing when she is free.

@lognaturel
Copy link
Member

@shobhitagarwal1612 If you fix these merge conflicts one more time, this is ready to go in. 🎉
@mmarciniak90 can take another pass at it after it's merged and file issues if needed.

# Conflicts:
#	collect_app/src/main/res/values-hi/strings.xml
#	collect_app/src/main/res/values-sq/strings.xml
#	collect_app/src/main/res/values-sv-rSE/strings.xml
…e-1039-sortdialog

# Conflicts:
#	collect_app/src/main/res/values-sv-rSE/strings.xml
@shobhitagarwal1612
Copy link
Contributor Author

shobhitagarwal1612 commented Aug 9, 2017

@lognaturel Merged the conflicts

@lognaturel lognaturel merged commit 2f5d5de into getodk:master Aug 9, 2017
@grzesiek2010 grzesiek2010 mentioned this pull request Aug 17, 2017
snavarreteimmap pushed a commit to snavarreteimmap/collect that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants