Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Issue 2761263003: Allow CollectionViewModel/Controller queries without SectionIdentifier (Closed)

Created:
3 years, 9 months ago by gambard
Modified:
3 years, 7 months ago
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow CollectionViewModel/Controller queries without SectionIdentifier This CL replace the method to get the indexPath of an item knowing its section identifier in the CollectionViewModel by a method returning the indexPath of an item even if its section identifier is unknown. It adds a method to know if an item is present in a CollectionViewModel. It also replace the reconfigure method of CollectionViewController to allow reconfiguring without knowing the section identifier of the items. BUG=703652 Review-Url: https://codereview.chromium.org/2761263003 Cr-Commit-Position: refs/heads/master@{#468964} Committed: https://chromium.googlesource.com/chromium/src/+/61dc89e9c94a7d2874e05c1ac9b0a02cf6d3bb7b

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add reconfigure to the VC #

Total comments: 6

Patch Set 3 : Address comments #

Patch Set 4 : Remove old methods #

Patch Set 5 : Cleanup #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -212 lines) Patch
M ios/chrome/browser/ui/authentication/signed_in_accounts_view_controller.mm View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M ios/chrome/browser/ui/authentication/signin_account_selector_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm View 1 2 3 4 chunks +4 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_controller.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_controller.mm View 1 2 3 1 chunk +2 lines, -5 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_controller_unittest.mm View 1 2 3 4 3 chunks +21 lines, -27 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_model.h View 1 2 3 1 chunk +4 lines, -2 lines 3 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_model.mm View 1 2 3 1 chunk +16 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm View 1 2 3 1 chunk +9 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm View 1 2 3 4 6 chunks +6 lines, -26 lines 0 comments Download
M ios/chrome/browser/ui/history/history_collection_view_controller.mm View 1 2 3 3 chunks +3 lines, -9 lines 0 comments Download
M ios/chrome/browser/ui/payments/credit_card_edit_view_controller.mm View 1 2 3 1 chunk +1 line, -4 lines 0 comments Download
M ios/chrome/browser/ui/payments/payment_request_selector_view_controller.mm View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/payments/payment_request_view_controller.mm View 1 2 3 4 chunks +4 lines, -8 lines 0 comments Download
M ios/chrome/browser/ui/reading_list/reading_list_collection_view_controller.mm View 1 2 3 4 5 chunks +9 lines, -25 lines 0 comments Download
M ios/chrome/browser/ui/settings/accounts_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M ios/chrome/browser/ui/settings/autofill_credit_card_edit_collection_view_controller.mm View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/settings/autofill_profile_edit_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/bandwidth_management_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M ios/chrome/browser/ui/settings/content_settings_collection_view_controller.mm View 1 2 3 2 chunks +2 lines, -4 lines 0 comments Download
M ios/chrome/browser/ui/settings/dataplan_usage_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/import_data_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/password_details_collection_view_controller.mm View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M ios/chrome/browser/ui/settings/privacy_collection_view_controller.mm View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/search_engine_settings_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/settings_collection_view_controller.mm View 1 2 3 7 chunks +7 lines, -14 lines 0 comments Download
M ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm View 1 2 3 6 chunks +6 lines, -12 lines 0 comments Download
M ios/chrome/browser/ui/settings/time_range_selector_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/translate_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/ui/settings/voicesearch_collection_view_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 32 (6 generated)
gambard
This CL will not be committed as is. This is intended to be a discussion ...
3 years, 9 months ago (2017-03-21 14:30:10 UTC) #2
rohitrao (ping after 24h)
What's the use case for this? Why don't you know the section identifier?
3 years, 9 months ago (2017-03-21 14:36:21 UTC) #3
gambard
On 2017/03/21 14:36:21, rohitrao wrote: > What's the use case for this? Why don't you ...
3 years, 9 months ago (2017-03-21 14:48:32 UTC) #4
rohitrao (ping after 24h)
If you have a pointer to the cell, you might be able to use https://developer.apple.com/reference/uikit/uicollectionview/1618094-indexpathforcell?language=objc. ...
3 years, 9 months ago (2017-03-21 15:13:30 UTC) #5
gambard
Yes, but as the items don't know the cell displayed, I need to find the ...
3 years, 9 months ago (2017-03-21 15:29:38 UTC) #6
lpromero
Regarding the new method: - conceptually, it takes the concept of -indexPathForItem:inSectionWithIdentifier: a step further. ...
3 years, 9 months ago (2017-03-22 14:04:22 UTC) #7
gambard
I will let rohit answer on the new method. Concerning the usage in ContentSuggestions, I ...
3 years, 9 months ago (2017-03-24 12:04:20 UTC) #8
gambard
I have added a method to reconfigure a cell based on the item, using this ...
3 years, 8 months ago (2017-03-28 08:15:09 UTC) #9
lpromero
Please update the description and add tests. https://codereview.chromium.org/2761263003/diff/20001/ios/chrome/browser/ui/collection_view/collection_view_model.mm File ios/chrome/browser/ui/collection_view/collection_view_model.mm (right): https://codereview.chromium.org/2761263003/diff/20001/ios/chrome/browser/ui/collection_view/collection_view_model.mm#newcode271 ios/chrome/browser/ui/collection_view/collection_view_model.mm:271: for (SectionItems* ...
3 years, 8 months ago (2017-03-28 09:09:08 UTC) #10
gambard
Thanks, I have updated the CL. It was intended as a discussion, this is why ...
3 years, 8 months ago (2017-03-28 13:35:23 UTC) #12
gambard
rohitrao: ping
3 years, 8 months ago (2017-04-04 16:15:28 UTC) #13
lpromero
Gauthier and I talked IRL and came up with this idea: 1. The collection view ...
3 years, 8 months ago (2017-04-07 12:10:22 UTC) #14
rohitrao (ping after 24h)
On 2017/04/07 12:10:22, lpromero wrote: > Gauthier and I talked IRL and came up with ...
3 years, 8 months ago (2017-04-07 12:15:06 UTC) #15
lpromero
On 2017/04/07 12:15:06, rohitrao wrote: > On 2017/04/07 12:10:22, lpromero wrote: > > Gauthier and ...
3 years, 8 months ago (2017-04-07 15:26:22 UTC) #16
gambard
On 2017/04/07 15:26:22, lpromero wrote: > On 2017/04/07 12:15:06, rohitrao wrote: > > On 2017/04/07 ...
3 years, 8 months ago (2017-04-10 12:17:11 UTC) #17
lpromero
On 2017/04/10 12:17:11, gambard wrote: > On 2017/04/07 15:26:22, lpromero wrote: > > On 2017/04/07 ...
3 years, 8 months ago (2017-04-10 12:25:10 UTC) #18
lpromero
Kindly ping, Rohit
3 years, 8 months ago (2017-04-19 16:24:19 UTC) #19
gambard
PTAL: Following our discussion at the convergence, I removed the old methods taking the items ...
3 years, 7 months ago (2017-05-02 12:46:16 UTC) #20
lpromero
LGMT. Please update the description. https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h File ios/chrome/browser/ui/collection_view/collection_view_model.h (right): https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h#newcode173 ios/chrome/browser/ui/collection_view/collection_view_model.h:173: inSectionWithIdentifier:(NSInteger)sectionIdentifier; Shouldn't we remove ...
3 years, 7 months ago (2017-05-02 13:18:08 UTC) #21
lpromero
lgtm
3 years, 7 months ago (2017-05-02 13:18:25 UTC) #22
gambard
Thanks! https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h File ios/chrome/browser/ui/collection_view/collection_view_model.h (right): https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h#newcode173 ios/chrome/browser/ui/collection_view/collection_view_model.h:173: inSectionWithIdentifier:(NSInteger)sectionIdentifier; On 2017/05/02 13:18:08, lpromero wrote: > Shouldn't ...
3 years, 7 months ago (2017-05-02 13:24:21 UTC) #23
lpromero
Thanks~ https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h File ios/chrome/browser/ui/collection_view/collection_view_model.h (right): https://codereview.chromium.org/2761263003/diff/80001/ios/chrome/browser/ui/collection_view/collection_view_model.h#newcode173 ios/chrome/browser/ui/collection_view/collection_view_model.h:173: inSectionWithIdentifier:(NSInteger)sectionIdentifier; On 2017/05/02 13:24:21, gambard wrote: > On ...
3 years, 7 months ago (2017-05-02 13:43:21 UTC) #25
gambard
rohit@: ping
3 years, 7 months ago (2017-05-03 14:12:47 UTC) #26
rohitrao (ping after 24h)
lgtm
3 years, 7 months ago (2017-05-03 14:22:54 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2761263003/80001
3 years, 7 months ago (2017-05-03 14:23:56 UTC) #29
commit-bot: I haz the power
3 years, 7 months ago (2017-05-03 14:37:10 UTC) #32
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/61dc89e9c94a7d2874e05c1ac9b0...

Powered by Google App Engine
This is Rietveld 408576698