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

#1556 - Toolbar, new Drawer and new Account Manager #1559

Merged
merged 84 commits into from
Oct 18, 2016
Merged

Conversation

AndyScherzinger
Copy link
Contributor

@AndyScherzinger AndyScherzinger commented Mar 23, 2016

This is the PR for #1556 - see todos and comments

At the moment my implementation is stable and available in the beta.

At the moment I also added the uploads menu item here as a dummy since this PR will be merged after the reliable uploads has been released so you all can already see how it will look like.

Material Design spec for side nav drawer:
http://www.google.com/design/spec/layout/structure.html#structure-side-nav


What has been done already:

  • integrate with toolbar and get navigation right
  • integrate new drawer implementation where menu items do have a checked state
  • FIXES Full-height material drawer? #1210
  • FIXES Quick Account-Switching in navigation drawer #1383
  • Successor of Account switching in navigation drawer #1537
  • integrate material style account switcher
  • implement colored circle/letter user icon with the right diameter in alignment to the oC server's implementation (this has already been implemented by @tobiasKaminsky an the account switcher branch)
  • remove old drawer implementation.
  • propagate account manager changes to the drawer including active account swapping
  • check for necessary fix for Username in drawer not refreshed when account is removed from uploads view #1572 after Reliable uploads - UPLOADS VIEW #1493 has been merged to master
  • modify header design with larger user icon and menu item aligned switcher text and smaller overall drawer header height
  • implement account switching in header via avatar icons (always remember and show the last 3 accounts)
  • test what happens for really, really, really long account names with the menu items
  • heavy testing for all Activities to make sure they all call the toolbar setup methods after they set the view content <<<< I did a lot of this during the code review; @jesmrec , not sure if you have more to do here. <<<< Present in test plan

RELATED BUGS:

POSSIBLE IMPROVEMENTS:

@AndyScherzinger
Copy link
Contributor Author

Screenshot of the initial implementation showing the checked state. At the moment the drawer has the standard material width which is quite huge.
device-2016-03-23-162533

We can make that any size though 😁
device-2016-03-23-162847

Checked menu item state:
device-2016-03-23-163052

So looping in @jancborchardt for design, @davivel for possible discussions about integration at some point and @tobiasKaminsky for account switching (I'll ping you again as soon as I have integrated the switcher implementation UI-wise).

@AndyScherzinger
Copy link
Contributor Author

small update, soon to be committed showing the account switch in the drawer header which is now 140dp fixed and will be 140dp and 164dp for sw360dp, see also https://medium.com/android-news/navigation-drawer-styling-under-material-design-f0767882e692#.76h6eeqi9
device-2016-03-23-193334

@tobiasKaminsky
Copy link
Contributor

@AndyScherzinger account switching on the branch #1537 should be stable enough to merge it into this branch.
If you have problems, please let me know

@AndyScherzinger
Copy link
Contributor Author

@tobiasKaminsky thanks for the info! 👍 I'll ping you when I'll have the UI for it up and running and will need your help merging since I really don't know my way around git that much.

@tobiasKaminsky
Copy link
Contributor

You can also ping me and I do the merge.
This should not be that hard ;)

@AndyScherzinger
Copy link
Contributor Author

Sounds perfect, great collaboration as always! 🎉

@AndyScherzinger
Copy link
Contributor Author

Screenshots of the actual progress.

  • view can be switched between accounts and standard menu
  • account add can be triggered but doesn't end up refreshing the account list (yet)
  • manage account is just a placeholder atm.
  • account switching is not implemented yet
  • user-letter circles implemented with color coding, open issue: slightly misaligned, so whoever is good at math/canvas feel free to jump in. items are max sizes for the menu items, size can't be raised or at least I haven't found a way to do it...
  • open issue: drawer status gets lost during screen rotation (state persistence not implemented yet)

Screenshot account list
device-2016-03-24-012519

Screenshot standard menu
device-2016-03-24-012536

@AndyScherzinger
Copy link
Contributor Author

Code reviews should probably wait until @jancborchardt provides feedback on the visuals :)

Feel free you check it anyways, any early feedback is highly welcome. Just FYI I introduced two activity parent implementations for the toolbar handling and for the drawer handling. The later being a child of the toolbar activity.

I will also implement a manage accounts activity which lists all account where the user will then be able to change the password and also to remove the account. This will basically work the way the Google apps handle account management and thus then remove the account management from the settings activity. I can also do this in a later PR which then work have to be stacked on this one, so if it is oka with you I would prefer to do it in this PR even though it will make this PR quite large (like most of my PRs 😉)

@AndyScherzinger
Copy link
Contributor Author

...enough for tonight... I now also implemented the account switching itself which has mostly been a move of all account related methods from the file activity to the drawer activity, plus some protected getter methods and binding the account clicks to the account switch.

@AndyScherzinger
Copy link
Contributor Author

DONE

  • view can be switched between accounts and standard menu
  • account switching is implemented
  • drawer status is preserved during screen rotation

OPEN

  • account add can be triggered but doesn't end up refreshing the account list
  • manage account is just a placeholder atm.
  • user-letter circles implemented with color coding, open issue: slightly misaligned, so whoever is good at math/canvas feel free to jump in. items are max sizes for the menu items, size can't be raised or at least I haven't found a way to do it...

@tobiasKaminsky
Copy link
Contributor

Cool stuff!
Can I therefore close my other PR #1537?

@AndyScherzinger
Copy link
Contributor Author

I guess so, but I think we should keep the branch until this PR is done just to make sure. Sorry that I didn't incorporate any changes from the other PR but down the road it seems easier/faster to just keep going on this branch.

@tobiasKaminsky
Copy link
Contributor

No problem 👍

@AndyScherzinger
Copy link
Contributor Author

DONE

  • account manager to change password and remove accounts
  • account manager integrated
  • accounts created via drawer menu get propagated back to the drawer incl. active account

OPEN

  • added account via drawer doesn't swap the account for the file list
  • account list changes via account manager don't get propagated back to the drawer / file list (need to call for results, send a dirty flag and update drawer and swap account in case active account changed)
  • user-letter circles implemented with color coding, open issue: slightly misaligned, so whoever is good at math/canvas feel free to jump in. items are max sizes for the menu items, size can't be raised or at least I haven't found a way to do it...
  • raise the size of the account switcher hitbox in the drawer for better usability
  • house keeping - uncommented all account relevant code in Preferences but will keep it until implementation is complete/stable

Screenshot of the account manager
device-2016-03-25-010721

@AndyScherzinger
Copy link
Contributor Author

@jancborchardt any feedback on the visuals?

@AndyScherzinger AndyScherzinger changed the title Toolbar and new Drawer - #1556 Toolbar, new Drawer and new Account Manager - #1556 Mar 25, 2016
@tobiasKaminsky
Copy link
Contributor

You can remove all account related lines from Preferences as they are still in master.
If you need some code you can easily compare your file with branch master within androidStudio and in the resulting compare screen select those lines you want to have back.

@AndyScherzinger
Copy link
Contributor Author

🎉 The implementation is basically done and is ready for test, two probable issue still open, see below 🎉

DONE

  • view can be switched between accounts and standard menu
  • account switching is implemented
  • drawer status is preserved during screen rotation
  • account manager to change password and remove accounts
  • account manager integrated
  • accounts created via drawer menu get propagated back to the drawer incl. active account
  • added account via drawer now swaps the account for the file list
  • account list changes via account manager get propagated back to the drawer / file list
  • house keeping - removed all account relevant code in Preferences
  • account add can be triggered and refreshes the account list (in account manager)
  • raise the size of the account switcher hitbox in the drawer for better usability

OPEN

  • user-letter circles implemented with color coding, open issue: slightly misaligned, so whoever is good at math/canvas feel free to jump in. items are max sizes for the menu items, size can't be raised or at least I haven't found a way to do it...
  • add account via drawer and then hitting the back button on the setup screen moves the app to the background. No idea why since this doesn't happen when you do the same thing in the account manager

@davivel
Copy link
Contributor

davivel commented Oct 14, 2016

I will rebase on master to get last translations (and to earn the last Github green check)

@davivel
Copy link
Contributor

davivel commented Oct 14, 2016

And please, notice that now this depends also on owncloud/android-library#138

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 18, 2016

The avatar changes will need extra checks. Working on it.

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 18, 2016

Approved.

These two issues have been created from the detected bugs as improvements:

#1825
#1826

…ctive server fetches, refactoring and clean-up
@davivel
Copy link
Contributor

davivel commented Oct 18, 2016

I updated the reference to the OC library after merging it's matching PR.

Thanks a lot, @AndyScherzinger . This contribution is pure LOVE.

@davivel davivel merged commit b25807b into master Oct 18, 2016
@davivel davivel deleted the 1556_toolbar branch October 18, 2016 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quick Account-Switching in navigation drawer Full-height material drawer?
8 participants