-
Notifications
You must be signed in to change notification settings - Fork 98
Conversation
8a2bca7
to
06299de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚚 🚌 🚗 Drive-by 🚏 🛑
Some things that come out of this:
- Naming conventions: can we work out a combination of words to show that there's some relationship between
Create
,Edit
,Show
,Item
,View
,Fragment
andPresenter
, and then rename all classes to fit that scheme. e.g.
CreateItem
+ View
, Fragment
, Presenter
.
EditItem
+ View
, Fragment
, Presenter
.
DisplayItem
+ View
, Fragment
, Presenter
.
-
There seems to be a massive similarity between
CreateItem
andEditItem
, all the way up to the discard changes dialog. Can we re-factorEditItem
fragment and presenter to allow some re-use? The answer to this may be "I tried, but it wasn't worth it". -
Could we start moving things into the
ItemDetailStore
. I have a feeling we'll get quite a long way by injecting theDataStore
into theItemDetailStore
. e.g. how might we do duplicate username detection with the same code path asDisplayItemPresenter
(néeItemDetailPresenter
).
@@ -142,13 +143,15 @@ class AppRoutePresenter( | |||
|
|||
R.id.fragment_locked to R.id.fragment_item_list -> R.id.action_locked_to_itemList | |||
R.id.fragment_locked to R.id.fragment_welcome -> R.id.action_locked_to_welcome | |||
R.id.fragment_locked to R.id.fragment_create -> R.id.action_locked_to_manualCreate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're able to create from the locked screen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the app autolocks in the middle of create, do we want to discard everything? My assumption is that we would want to continue where we left off and continue from the create screen until we intentionally ❌ or ✅
I found the
That being said, I'm more than willing to be convinced 😌 |
741f871
to
b15176e
Compare
b15176e
to
26fb4a7
Compare
We arrived on the following for naming conventions:
|
@jhugman this needs some styling work. Looks like the |
We can do both. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closeKeyboard
problem.
I'm fairly sure we just want to closeKeyboard
when we move away from this screen, in which case we can call it from the fragment onPause
method or call it from RoutePresenter
when there is a change in route action.
app/src/main/java/mozilla/lockbox/presenter/ItemListPresenter.kt
Outdated
Show resolved
Hide resolved
|
9a606f5
to
a0e35c7
Compare
@jhugman I fixed the FAB issue, but I still have two outstanding issues (see my checklist in the last comment). Other than that the functionalities seem to be working as expected. |
2dd5308
to
eb2c2d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When initially opening the create screen, hostname and password fields default to the error state
**Moved to new issue: ** #1120
Moving a conversation I had with @jhugman in slack to this PR: essentially, in almost all use cases, a user shouldn't see these inline errors until they've actually made a misstep. I think the error messages should only be visible once someone leaves focus, and we've checked that they hadn't met the requirements. So as a use case, someone comes to this screen after hitting the + button...
|
@changecourse I'd like to move this into a follow up issue. This PR is big enough and long running enough to get this landed before more work goes into it. |
Add click route for item list create button. Add icon on create button. Tests for item list and create presenter Update credentials to save Cleanup and passing tests Ripple click on + button Password visibility tests Field titles instead of hints Rename edit view. Cleanup presenters and tests Lint and datastore add test
…esenter for create and edit shared functionality. First pass on mutation presenter Refactoring presenters
…ounds and styles correctly for edit and create. Close keyboard onpause and ondestroy. Item list button and drawer working. Rebase and set cursor color on create hostname field Restore sort spinner Fixup EditItemPresenterTest Fixup DisplayItemStoreTest ktlintFormat Refactor error observation. WIP pairing. Moving credentialToSave to an Observable Manual create refactored This brings a lot of the logic from gathering data about the edit session in to the `ItemDetailStore`. * `availableUsernames` * `isDirty` * `isEditing`. This allows us to have a much heavier `ItemMutationPresenter`, which is only lightly specialized by `EditItemPresenter` and `CreateItemPresenter`. With this store, we introduce the concepts of an edit/create session, which the store manages for us. Finish refactoring presenters Begin to unify fragments Trying to get create and edit fragments working together, with separate XML files.
Both create and edit working as expected, with errors Making save more consistent and safer Fixup the correct field to be editing ktlintFormat
5626e9d
to
b253f18
Compare
Moved tests to use the more heavy weight item detail store, and lighter presenters. We're still not testing the mutate item presenters explicitly, but test coverage seems fairly sane.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elise says it's ok. I say it's ok. Bitrise it's ok. BGB.
Fixes #821
Testing and Review Notes
Designs: https://app.zeplin.io/project/5b6895bfe4af825140aa8dbc?seid=5c5490093af38330875be09c
Routes back to the item list after a successful save. Might do the routing to the newly created item on #822.
Screenshots or Videos
To Do
eng todo
+
button+
button clickother