Не удается получить всплывающую подсказку для пользовательской кнопки на ленте Word — ошибка?

Кнопка Википедии на ленте Word имеет всплывающую подсказку, которая предлагает более подробную информацию...

Новая схема манифеста Office.js включает поля для подсказок и суперподсказок, но я не могу заставить их отображаться в моем обычном эксперименте с лентой с одной кнопкой. Я просто получаю метку/имя кнопки в качестве всплывающей подсказки.

Это похоже на ошибку ... манифесты действительно привередливы, и этот определенно работает.

Тестирование на macOS Sierra.

<?xml version="1.0" encoding="utf-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">

<Id>2c77d848-f893-4938-ad5f-5ea03d3608dc</Id>
<Version>1.0.0.0</Version>
<ProviderName>11trees</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Q for Success LOCAL" />
<Description DefaultValue="Success begins with good questions! Q for Success helps streamline access to your institution's research resources while helping students master academic writing and other related skills." />
<IconUrl DefaultValue="https://www.11trees.com/images/annotate/Annotate-32x32-circle.png" />
<SupportUrl DefaultValue="https://www.11trees.com/live/support/" />

 <!--Icon for your add-in. Used on installation screens and the add-ins dialog -->

<AppDomains>
    <AppDomain>https://trees-3aac6.firebaseio.com</AppDomain>
    <AppDomain>https://www.firebaseapp.com</AppDomain>
    <AppDomain>https://www.googleapis.com</AppDomain>
    <AppDomain>https://www.facebook.com</AppDomain>
</AppDomains>

<Hosts>
    <Host Name="Document"/>
</Hosts>

<DefaultSettings>
  <!-- Local macOS -->
    <SourceLocation DefaultValue="http://localhost/AnnotateX/qWord/qHome.html" />

</DefaultSettings>

<Permissions>ReadWriteDocument</Permissions>
  <!--BeginAddinCommandsMode integration-->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <!--Each host can have a different set of commands. Cool huh!? -->
      <!-- Workbook=Excel Document=Word Presentation=PowerPoint -->
      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest -->
      <Host xsi:type="Document">
        <!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
        <DesktopFormFactor>

           <!--GetStarted information used on the callout that appears when installing the add-in.
            Ensure you have build 16.0.6769 or above for GetStarted section to work-->
          <GetStarted>
                        <!--Title of the Getting Started callout. resid points to a ShortString resource -->
                        <Title resid="11trees.GetStarted.Title"/>

                        <!--Description of the Getting Started callout. resid points to a LongString resource -->
                        <Description resid="11trees.GetStarted.Description"/>

                        <!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL.
                            resid points to a Url resource -->
                        <LearnMoreUrl resid="11trees.GetStarted.LearnMoreUrl"/>
                    </GetStarted>

            <!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called.
            Think of the FunctionFile as the "code behind" ExecuteFunction-->
          <FunctionFile resid="11trees.FunctionFile.Url" />

          <!--PrimaryCommandSurface==Main Office Ribbon-->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
            <!-- Documentation includes all the IDs currently tested to work -->
            <OfficeTab id="TabReferences">
            <!--Group. Ensure you provide a unique id. Recommendation for any IDs is to namespace using your companyname-->
            <Group id="11trees.q.Group1">
              <!--Label for your group. resid must point to a ShortString resource -->
              <Label resid="11trees.Group1.Label" />
              <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
              <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
              <Icon>
                <bt:Image size="16" resid="11trees.TaskpaneButton.Icon" />
                <bt:Image size="32" resid="11trees.TaskpaneButton.Icon" />
                <bt:Image size="80" resid="11trees.TaskpaneButton.Icon" />
              </Icon>
             <!--Control. It can be of type "Button" or "Menu" -->

               <Control xsi:type="Button" id="11trees.TaskpaneButton1">
                 <Label resid="11trees.TaskpaneButton1.Label" />
                <Tooltip resid="11trees.TaskpaneButton1.Tooltip"/>
                <Supertip>
                  <Title resid="11trees.TaskpaneButton1.Label" />
                  <Description resid="11trees.TaskpaneButton1.Supertip" />
                </Supertip>
                 <Icon>
                   <bt:Image size="16" resid="11trees.TaskpaneButton.Icon" />
                   <bt:Image size="32" resid="11trees.TaskpaneButton.Icon" />
                   <bt:Image size="80" resid="11trees.TaskpaneButton.Icon" />
                 </Icon>
                 <Action xsi:type="ShowTaskpane">
                   <TaskpaneId>11trees.qforsuccess</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                   <SourceLocation resid="11trees.Taskpane1.Url" />
                 </Action>
               </Control>
            </Group>
          </OfficeTab>


          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="11trees.TaskpaneButton.Icon" DefaultValue="https://www.11trees.com/images/annotate/Annotate-128x128-circle.png" />
        <bt:Image id="11trees.FunctionButton.Icon" DefaultValue="https://www.11trees.com/images/annotate/Annotate-128x128-circle.png" />
      </bt:Images>
      <bt:Urls>

<!-- Local macOS -->
        <bt:Url id="11trees.FunctionFile.Url" DefaultValue="http://localhost/AnnotateX/AnnoWord/functionFile.html" />
        <bt:Url id="11trees.Taskpane1.Url" DefaultValue="http://localhost/AnnotateX/qWord/qHome.html" />
        <bt:Url id="11trees.Taskpane2.Url" DefaultValue="http://localhost/AnnotateX/qWord/insertComment.html" />
        <bt:Url id="11trees.Taskpane3.Url" DefaultValue="http://localhost/AnnotateX/qWord/enterComment.html" /> —>



<!-- Local Windows -->
        <!-- <bt:Url id="11trees.FunctionFile.Url" DefaultValue="http://localhost/AnnotateforWord_dev/AnnotateCode/functionFile.html" /> -->
        <!-- <bt:Url id="11trees.Taskpane1.Url" DefaultValue="http://localhost/AnnotateforWord_dev/AnnotateCode/annotateHome.html" /> -->
        <!-- <bt:Url id="11trees.Taskpane2.Url" DefaultValue="http://localhost/AnnotateforWord_dev/AnnotateCode/insertComment.html" /> -->
        <!-- <bt:Url id="11trees.Taskpane3.Url" DefaultValue="http://localhost/AnnotateforWord_dev/AnnotateCode/enterComment.html" /> -->

<!-- Staging -->

        <!-- <bt:Url id="11trees.FunctionFile.Url" DefaultValue="http://localhost/AnnotateforWord_dev/AnnotateCode/functionFile.html" />
        <bt:Url id="11trees.Taskpane1.Url" DefaultValue="https://www.11trees.com/annotate/word/beta/AnnotateCode/annotateHome.html" />
        <bt:Url id="11trees.Taskpane2.Url" DefaultValue="https://www.11trees.com/annotate/word/beta/AnnotateCode/insertComment.html" />
        <bt:Url id="11trees.Taskpane3.Url" DefaultValue="https://www.11trees.com/annotate/word/beta/AnnotateCode/enterComment.html" /> -->

<!-- Production -->
        <!-- <bt:Url id="11trees.FunctionFile.Url" DefaultValue="https://www.11trees.com/annotate/word/prod/functionFile.html" />
        <bt:Url id="11trees.Taskpane1.Url" DefaultValue="https://www.11trees.com/annotate/word/prod/annotateHome.html"/>
        <bt:Url id="11trees.Taskpane2.Url" DefaultValue="https://www.11trees.com/annotate/word/prod/insertComment.html" />
        <bt:Url id="11trees.Taskpane3.Url" DefaultValue="https://www.11trees.com/annotate/word/prod/enterComment.html" /> -->

         <!--LearnMore URL currently not used -->
        <bt:Url id="11trees.GetStarted.LearnMoreUrl" DefaultValue="https://11trees.com/live/support/">
        </bt:Url>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="11trees.Group1.Label" DefaultValue="Q for Success">
        </bt:String>

        <bt:String id="11trees.FunctionButton.Label" DefaultValue="Execute Function" />
        <bt:String id="11trees.TaskpaneButton1.Label" DefaultValue="Home" />
         <bt:String id="11trees.Tab1.TabLabel" DefaultValue="Q" />
         <bt:String id="11trees.GetStarted.Title" DefaultValue="Q for Success was successfully added">
          <bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
        </bt:String>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="11trees.FunctionButton.Tooltip" DefaultValue="Click to Execute Function" />
        <bt:String id="11trees.TaskpaneButton1.Tooltip" DefaultValue="Click to show Q" />
        <bt:String id="11trees.TaskpaneButton1.Supertip" DefaultValue="Click to show Q for Success and gain quick access to your institution's research resources plus help with academic writing." />
        <bt:String id="11trees.GetStarted.Description" DefaultValue="Get going by clicking the Annotate tab on the Ribbon">
          <bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
        </bt:String>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>

</OfficeApp>

Обновление фрагментом последнего манифеста...

Я получаю желаемый результат - немного больше описания при наведении курсора, но содержимое вытягивается из ЭТИКЕТКИ, а не из СУПЕРТИПА. Чего я не понимаю...

Может быть, я неправильно понимаю, что делает суперподсказка в манифесте Office...

Снимок экрана: Скриншот всплывающей подсказки/метки/суперподсказки

Кнопка:

<Control xsi:type="Button" id="11trees.TaskpaneButton1">
   <Label resid="11trees.TaskpaneButton1.Label" />
  <Tooltip resid="11trees.TaskpaneButton1.Tooltip"/>
  <Supertip>
    <Title resid="11trees.TaskpaneButton1.TipLabel" />
    <Description resid="11trees.TaskpaneButton1.Supertip" />
  </Supertip>
   <Icon>
     <bt:Image size="16" resid="11trees.TaskpaneButton.Icon" />
     <bt:Image size="32" resid="11trees.TaskpaneButton.Icon" />
     <bt:Image size="80" resid="11trees.TaskpaneButton.Icon" />
   </Icon>
   <Action xsi:type="ShowTaskpane">
     <TaskpaneId>11trees.qforsuccess</TaskpaneId>
      <!--Provide a url resource id for the location that will be displayed on the task pane -->
     <SourceLocation resid="11trees.Taskpane1.Url" />
   </Action>
</Control>

Строки:

<bt:ShortStrings>
  <bt:String id="11trees.Group1.Label" DefaultValue="Q for Success">
  </bt:String>
  <bt:String id="11trees.FunctionButton.Label" DefaultValue="Execute Function" />
  <bt:String id="11trees.TaskpaneButton1.Label" DefaultValue="Home" />
  <bt:String id="11trees.TaskpaneButton1.TipLabel" DefaultValue="Open Q for Success to access research and writing resources." />
   <bt:String id="11trees.Tab1.TabLabel" DefaultValue="Q" />
   <bt:String id="11trees.GetStarted.Title" DefaultValue="Q for Success was successfully added">
    <bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
  </bt:String>
</bt:ShortStrings>
<bt:LongStrings>
  <bt:String id="11trees.TaskpaneButton1.Supertip" DefaultValue="Click to show Q for Success and gain quick access to your institution's research resources plus help with academic writing." />
  <bt:String id="11trees.GetStarted.Description" DefaultValue="Get going by clicking the Q button in the References tab">
    <bt:Override Locale="ja-jp" Value="JA-JP Get Started Title" />
  </bt:String>
</bt:LongStrings>

person 11teenth    schedule 31.05.2017    source источник


Ответы (1)


У вас есть пара проблем с вашим манифестом. Во-первых, <tooltip> больше не является допустимым элементом, всплывающие подсказки были заменены элементом <supertip>. В вашем манифесте вы определяете оба элемента.

Вторая проблема заключается в том, что вы неправильно определяете <supertip>. Причина, по которой вы видите метку кнопки, заключается в том, что вы назначили ее своему ресурсу метки.

<Title resid="11trees.TaskpaneButton1.Label" />

SuperTip должен содержать два элемента; Заголовок и Описание. Title должен быть ресурсом ShortStrings, Description должен быть < ресурс href="https://dev.office.com/reference/add-ins/manifest/resources" rel="nofollow noreferrer">LongStrings:

<Control xsi:type="Button" id="11trees.TaskpaneButton1">
  <Label resid="11trees.TaskpaneButton1.Label" />
  <Supertip>
    <Title resid="[ShortString ResourceId]" />
    <Description resid="[LongString ResourceId]" />
  </Supertip>
  <Icon>
    <bt:Image size="16" resid="11trees.TaskpaneButton.Icon" />
    <bt:Image size="32" resid="11trees.TaskpaneButton.Icon" />
    <bt:Image size="80" resid="11trees.TaskpaneButton.Icon" />
  </Icon>
  <Action xsi:type="ShowTaskpane">
    <TaskpaneId>11trees.qforsuccess</TaskpaneId>
    <SourceLocation resid="11trees.Taskpane1.Url" />
  </Action>
</Control>
person Marc LaFleur    schedule 31.05.2017
comment
Спасибо за внимание и за подробный ответ. Я должен был указать, что добавил строку Tooltip, потому что я не получил никакой любви от Supertip и нашел (я думаю, более старые) примеры с Tooltip. Может быть, я неправильно понимаю Supertip. Я ожидаю, что текст при наведении будет тем, что я поместил в Supertip. Но то, что я получаю в качестве текста при наведении, — это содержимое шорткода Label. Итак, я обновил ярлык, чтобы отображать то, что я хочу, с желаемыми результатами... Где появляются суперсоветы? - person 11teenth; 01.06.2017
comment
Он отображает метку, потому что вы настроили ее для этого в своем манифесте. Проверьте заголовок подсказки, он настроен на отображение ресурса ярлыка. - person Marc LaFleur; 01.06.2017
comment
Я добавил свой текущий XML и скриншот к исходному вопросу. Теперь у меня есть желаемый результат для пользователей... но мне все еще не хватает некоторого различия между метками и суперподсказками... Я не думаю, что проблема в том, что у меня неправильно обозначен заголовок подсказки. - person 11teenth; 02.06.2017
comment
@Marc LaFleur, у меня такая же проблема в Office Word Online. Суперподсказка управления кнопками не работает? - person Muthukrishnan R; 08.05.2018