|
|
Created:
3 years, 7 months ago by Marti Wong Modified:
3 years, 7 months ago CC:
chromium-reviews, agrieve+watch_chromium.org, dfalcantara+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix the bug that 'Afikaans' is unable to be selected in language menu.
It is because the item 'Afikaans' was mistakenly disabled in
TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED.
This could be fixed by creating Id offsets for the menuItems of
different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.)
This can prevent the menuItem's IDs of those menus from overlapping.
And make menu bugs in future easier to investigate and fix.
More info:
MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar.
MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above.
MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu.
Prototype of the new translation infobar:
https://bbergher.googleplex.com/prototypes/translate/easier-1/
BUG=721950
Review-Url: https://codereview.chromium.org/2882143002
Cr-Commit-Position: refs/heads/master@{#471990}
Committed: https://chromium.googlesource.com/chromium/src/+/6a55a101eb8e05a04285cfd416b6506d711a7d19
Patch Set 1 : fix #Patch Set 2 : make ID_UNDEFINED = -1 #Messages
Total messages: 17 (9 generated)
martiw@chromium.org changed reviewers: + googleo@google.com, mdjones@chromium.org
PTAL. thanks
Description was changed from ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by doing the isEnabled() check for MENU_OVERFLOW only. (but not for MENU_TARGET_LANGUAGE and MENU_SOURCE_LANGUAGE.) BUG=721950 ========== to ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by doing the isEnabled() check for MENU_OVERFLOW only. (but not for MENU_TARGET_LANGUAGE and MENU_SOURCE_LANGUAGE.) More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ==========
Description was changed from ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by doing the isEnabled() check for MENU_OVERFLOW only. (but not for MENU_TARGET_LANGUAGE and MENU_SOURCE_LANGUAGE.) More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ========== to ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by doing the isEnabled() check for MENU_OVERFLOW only. (but not for MENU_TARGET_LANGUAGE and MENU_SOURCE_LANGUAGE.) More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ==========
Description was changed from ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by doing the isEnabled() check for MENU_OVERFLOW only. (but not for MENU_TARGET_LANGUAGE and MENU_SOURCE_LANGUAGE.) More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ========== to ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can preventing the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ==========
Patchset #1 (id:1) has been deleted
Would it make more sense for ID_UNDEFINED to be a negative number so it never collides with any valid item? nit: "preventing" -> "prevent" in description.
Description was changed from ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can preventing the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ========== to ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can prevent the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ==========
On 2017/05/15 16:25:21, mdjones wrote: > Would it make more sense for ID_UNDEFINED to be a negative number so it never > collides with any valid item? > > nit: "preventing" -> "prevent" in description. Thanks Matthew. Yup. your way is simplier. Done and PTAL again.
lgtm
On 2017/05/16 00:45:15, mdjones wrote: > lgtm Also update the description to match the solution.
On 2017/05/16 00:45:15, mdjones wrote: > lgtm thanks Matthew!
The CQ bit was checked by martiw@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1494895566409410, "parent_rev": "2c74298547fc78cca48b66e917e0983dedacdbb4", "commit_rev": "6a55a101eb8e05a04285cfd416b6506d711a7d19"}
Message was sent while issue was closed.
Description was changed from ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can prevent the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 ========== to ========== Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can prevent the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 Review-Url: https://codereview.chromium.org/2882143002 Cr-Commit-Position: refs/heads/master@{#471990} Committed: https://chromium.googlesource.com/chromium/src/+/6a55a101eb8e05a04285cfd416b6... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as https://chromium.googlesource.com/chromium/src/+/6a55a101eb8e05a04285cfd416b6... |