New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687359 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Add title param to chrome.app.window.create()

Reported by rafael.a...@intel.com, Jan 31 2017

Issue description

Apps can create new windows with parameter ShowInShelf=True, which means a new entry on the shelf is going to be created to that window. However, that entry’s title (text that appears as a tooltip when the user hovers over it) is the extension name.

We need a way to change the entry title to one specified by the app when calling chrome.app.window.create(). I propose something in the CreateWindowOptions, like 'title' or 'tooltip'.
 
Labels: TE-NeedsTriageHelp

Comment 3 by lima...@gmail.com, Feb 22 2017

Hi Rafael. the proposal is not open. could you make it public?

Hi,

I followed the instructions to request Google to create the proposal document, so it's visible to people with @chromium.org accounts. I'm not sure what's the motivation for that, but would be better if you could ask them to open the proposal.
Status: Untriaged (was: Unconfirmed)
I know this has been discussed elsewhere, but what are the objections to using window.title for the tooltip for windows with showInShelf=true?

Cc: keta...@chromium.org steve...@chromium.org dskaram@chromium.org
Labels: -OS-Linux OS-Chrome
Summary from: https://docs.google.com/document/d/11mpZ3sQv41LqJ9nURxGRkC9wROyBdhYSyw_2C5GzZMY/edit
-----------------------------
1) Use createwindowoptions title for describing what the shelf entry icon is for. This will appear on the tooltip of the shelf.
2) Use document.title for showing in overview mode (F5 button press) or Alt+tab. This is already existing so do not want to change this.
3) Use groupId or similar to group shelf entries with same groupId.
4) Use document.title to show stacked entries within the same group.

If we agree, do let us know your plans on making these changes.

It would also be good to have pinning persistence changes as well then this document will be complete
-----------------------------

Background:
document.title already works today when seeing windows in overview mode or doing Alt+Tab. 
Using it for showing title could seem like a good choice but,
When grouping/stacking is implemented, it gets tricky as it would be not known which document.title to be used.
So idea was to use title(or similar property like tooltip or description) for each entry in shelf. 
This way shelf entry tooltip would show as "Excel" (using property) but when clicking that icon, each stacked entry would show up something like "Document1", "Document1" (using document.title).

This bug is only about tooltip so if document.title is used it is fine but when grouping is implemented it could use above recommendation.

I will add more context if some details are not clear. Document contains similar discussion items and screenshots on how this would look when implemented.

I discussed with Vipin and we agreed that grouping and stacking are out of scope here and we are looking at the min viable implementation so that we can deliver this feature and close on the Chrome OS stream (and start focusing on Android).

Since we won't be implementing grouping or stacking, do we see any further issues with document.title? Or can we simply moved ahead on this?
Cc: philip.h...@intel.com
Status: Available (was: Untriaged)
Adding Philip. Please take a look at comment #8.
Re comment #7:

Thanks for the detailed explanation. I understand now why we would like to differentiate between documemnt.title (e.g. "Document1") vs. a window group name (e.g. "Spreadsheet") v.s the app name (e.g. "Application Suite").

Question: Are we planning to implement grouping or pinning? If so, then we do need a group name. If not, then I think that the following logic would suffice:

if (app_window.show_in_shelf() && document.title)
  tooltip = document.title;
else
  tooltip = app name;

If there can only be one window per 'showInShelf' icon, there is no need for a separate name for the group.

Re comment #8:

Yes, let us proceed with document.title as title is really required.

Grouping/stacking/pinning would still be useful (not in the context of this bug). Even though changes are in Chrome API now, logic/design would still be applicable to Android apps in Chrome as well when doing shelf integration.

Re comment #10:

pseudo code mentioned above should work.
Uploaded a patch for using document.title: https://chromium-review.googlesource.com/c/526276/
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3be296071f031ad70ec2a217b6c551c5ff2146d3

commit 3be296071f031ad70ec2a217b6c551c5ff2146d3
Author: Philip Hanson <philip.hanson@intel.com>
Date: Mon Jun 12 18:08:06 2017

Make secondary app shelf icon tooltips match document.title.

Exclusively for extension app windows spawned using showInShelf = true,
make the tooltip text for the shelf item (icon) match the current value
of document.title from the corresponding window.

BUG= chromium:687359 
TEST=Verify that the shelf item tooltip for extension app windows
     matches the document.title once the content is loaded.
TEST=From an extension app window with showInShelf=true, change the
     document.title dynamically and confirm that the shelf item tooltip
     changes to match.

Change-Id: I4620052821c19d91ea803151dc2cd4e538be121d
Reviewed-on: https://chromium-review.googlesource.com/526276
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478681}
[modify] https://crrev.com/3be296071f031ad70ec2a217b6c551c5ff2146d3/AUTHORS
[modify] https://crrev.com/3be296071f031ad70ec2a217b6c551c5ff2146d3/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
[modify] https://crrev.com/3be296071f031ad70ec2a217b6c551c5ff2146d3/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
[modify] https://crrev.com/3be296071f031ad70ec2a217b6c551c5ff2146d3/chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.cc
[modify] https://crrev.com/3be296071f031ad70ec2a217b6c551c5ff2146d3/chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h

Confirmed in 61.0.3129.0 (ChromeOS dev channel) that title is being used.
Status: Fixed (was: Available)

Sign in to add a comment