} else if (command_id == IDC_CREATE_NEW_TAB_GROUP &&If the everything menu isn't showing, and the command is to create a new tab group, then the user must have clicked on the 'create new tab group' option at the top level.
} else if (!features::IsTabGroupMenuMoreEntryPointsEnabled()) {Same logic here
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {Having 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
stg_everything_menu_->ExecuteCommand(command_id, mouse_event_flags);The logic seems to be incorrect for this route. The original code has an early return in this case. Now since the return is removed, entry.first->ActivatedAt is called, causing create new tab group to execute twice.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {Having 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
if this feature flag is on, lets move the button up to the top level like in the UI updates request and remove the one in the submenu, but yes youre right i think this might be a bit confusing if we were to have 2
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
stg_everything_menu_->ExecuteCommand(command_id, mouse_event_flags);The logic seems to be incorrect for this route. The original code has an early return in this case. Now since the return is removed, entry.first->ActivatedAt is called, causing create new tab group to execute twice.
You're right oops. That probably explains some of the test failures.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {David PenningtonHaving 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
if this feature flag is on, lets move the button up to the top level like in the UI updates request and remove the one in the submenu, but yes youre right i think this might be a bit confusing if we were to have 2
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
stg_everything_menu_->ExecuteCommand(command_id, mouse_event_flags);Dominic AustriaThe logic seems to be incorrect for this route. The original code has an early return in this case. Now since the return is removed, entry.first->ActivatedAt is called, causing create new tab group to execute twice.
You're right oops. That probably explains some of the test failures.
It really is confusing to have two buttons, huh.
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {David PenningtonHaving 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
Dominic Austriaif this feature flag is on, lets move the button up to the top level like in the UI updates request and remove the one in the submenu, but yes youre right i think this might be a bit confusing if we were to have 2
That makes more sense, will make those changes
Based on product feedback, do we still want 2 new tab group buttons from the app menu? If we do, my opinion is we should have another command id, say IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL to avoid confusion.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {David PenningtonHaving 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
Dominic Austriaif this feature flag is on, lets move the button up to the top level like in the UI updates request and remove the one in the submenu, but yes youre right i think this might be a bit confusing if we were to have 2
Yuheng HuangThat makes more sense, will make those changes
Based on product feedback, do we still want 2 new tab group buttons from the app menu? If we do, my opinion is we should have another command id, say IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL to avoid confusion.
Yes we now want 2 new tab group buttons. I agree, I think this will simplify code in multiple places. like AppMenu::ExecuteCommand()and AppMenuModel::Build().
}I think this test is now obsolete since I test this behaviour in saved_tab_group_interactive_uitest.cc . Can I remove it?
stg_everything_menu_->ExecuteCommand(command_id, mouse_event_flags);Dominic AustriaThe logic seems to be incorrect for this route. The original code has an early return in this case. Now since the return is removed, entry.first->ActivatedAt is called, causing create new tab group to execute twice.
Dominic AustriaYou're right oops. That probably explains some of the test failures.
It really is confusing to have two buttons, huh.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {David PenningtonHaving 3 dots menu to have 2 Create New Tab Group menu item is confusing(One under top level one on the tab group submenu). Is it a good idea to do that at all? @dpen...@chromium.org what do you think?
Dominic Austriaif this feature flag is on, lets move the button up to the top level like in the UI updates request and remove the one in the submenu, but yes youre right i think this might be a bit confusing if we were to have 2
Yuheng HuangThat makes more sense, will make those changes
Dominic AustriaBased on product feedback, do we still want 2 new tab group buttons from the app menu? If we do, my opinion is we should have another command id, say IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL to avoid confusion.
Yes we now want 2 new tab group buttons. I agree, I think this will simplify code in multiple places. like AppMenu::ExecuteCommand()and AppMenuModel::Build().
Done
I think this test is now obsolete since I test this behaviour in saved_tab_group_interactive_uitest.cc . Can I remove it?
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NO_IFTT='new command is not gated on fenced frame network status'Put this below change-id 👍
#define IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL 34106question: What does top level mean in this case?
if (command_id == IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL) {Can we add a brief comment explaining why we are early returning and not executing the command here?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NO_IFTT='new command is not gated on fenced frame network status'Put this below change-id 👍
What is NO_IFTT by the way? We should have a brief description of what the CL does similar to other CLs.
if (command_id == IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL) {Can we add a brief comment explaining why we are early returning and not executing the command here?
Do we need this block at all? If the feature flag is disabled I don't think we will run into this if case since the menu item will not be created.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
#define IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL 34106question: What does top level mean in this case?
So we are putting a 'create new tab group' menu item in the 3dot menu, but in the first layer (it would be between the 'new tab' and 'new window' menu options).
Yuheng and I thought it would be less confusing to create a new command ID for this menu item, instead of having two menu items that correspond to the same command ID
if (command_id == IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL) {Yuheng HuangCan we add a brief comment explaining why we are early returning and not executing the command here?
Do we need this block at all? If the feature flag is disabled I don't think we will run into this if case since the menu item will not be created.
hmm, i think you are right. ill check and see and remove it if I can
nit: remove this new line change
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NO_IFTT='new command is not gated on fenced frame network status'Yuheng HuangPut this below change-id 👍
What is NO_IFTT by the way? We should have a brief description of what the CL does similar to other CLs.
There is a linter warning whenever I make changes to chrome/app/chrome_command_ids.h and to silence it I have to put this in my commit description. In any case I added a more detailed CL description
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (command_id == IDC_CREATE_NEW_TAB_GROUP_TOP_LEVEL) {Yuheng HuangCan we add a brief comment explaining why we are early returning and not executing the command here?
Dominic AustriaDo we need this block at all? If the feature flag is disabled I don't think we will run into this if case since the menu item will not be created.
hmm, i think you are right. ill check and see and remove it if I can
Done
Dominic Austrianit: remove this new line change
my bad
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NO_IFTT='new command is not gated on fenced frame network status'Yuheng HuangPut this below change-id 👍
Dominic AustriaWhat is NO_IFTT by the way? We should have a brief description of what the CL does similar to other CLs.
There is a linter warning whenever I make changes to chrome/app/chrome_command_ids.h and to silence it I have to put this in my commit description. In any case I added a more detailed CL description
This warning is mainly applicable to commands that can navigate the browser in some way other that creating a default new tab. This is because fenced frames (which are supposed to be more secure than iframes in html) want to restrict network access / data sharing between the frame and the embeddings. This is so the data can be isolated.
For the vast majority of cases this is not applicable for new commands but is something to keep in mind.
Some documentation if anyone is interested!:
1) https://github.com/WICG/fenced-frame/blob/master/explainer/fenced_frames_with_local_unpartitioned_data_access.md#revoking-network-access
2) https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/renderer_context_menu/render_view_context_menu.h;drc=2807cfc042c06d4c6bc767ccc33fb194e17e47d2;l=563
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
NO_IFTT='new command is not gated on fenced frame network status'nit: 1 more T to get rid of the linter error `NO_IFTTT=`
Dominic Austriaquestion: What does top level mean in this case?
So we are putting a 'create new tab group' menu item in the 3dot menu, but in the first layer (it would be between the 'new tab' and 'new window' menu options).
Yuheng and I thought it would be less confusing to create a new command ID for this menu item, instead of having two menu items that correspond to the same command ID
Got it - maybe `IDC_CREATE_NEW_TAB_GROUP_APP_MENU` instead?
I agree with having 2 commands for this, let's leave the name as is for now since I can't come up with something more explicit and don't want to block on naming.
We can revisit and rename this command when we come up with something better 👍
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
NO_IFTT='new command is not gated on fenced frame network status'nit: 1 more T to get rid of the linter error `NO_IFTTT=`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
return features::IsTabGroupMenuMoreEntryPointsEnabled();nit: Can just return true since if the feature flag is not enabled this command will not exist.
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {nit: No need to check this since if feature flag is not enabled this command does not show anywhere.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
} super duper nit: Remove trailing whitespace!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
super duper nit: Remove trailing whitespace!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Dominic Austriasuper duper nit: Remove trailing whitespace!
haha ok. i am trying vim so its my bad
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
return features::IsTabGroupMenuMoreEntryPointsEnabled();nit: Can just return true since if the feature flag is not enabled this command will not exist.
Done
if (features::IsTabGroupMenuMoreEntryPointsEnabled()) {nit: No need to check this since if feature flag is not enabled this command does not show anywhere.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[TabGroupMenus] add create new tab group option to app menu top level
Adds a 'Create new tab group' menu item to the three dot menu at the top
level, in between 'New Tab' and 'New Window'
NO_IFTTT='new command is not gated on fenced frame network status'
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |