SupportsNoItemContext 在 Mac 客户端和 Web 上的行为不同

问题描述 投票:0回答:1

我注意到 SupportsNoItemContext 在 Outlook 网页版和 Outlook 客户端 Mac 上的行为有所不同。特别是:

  • 任务窗格在网页版中不可固定
  • 网络版本中的消息撰写操作中任务窗格消失

下面是显示行为差异的屏幕

Mac 版 Outlook

Outlook 网页版

我的清单文件如下:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
  <Id>d744d71a-377c-4977-acc9-f3fb16cdc084</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Internet</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Sample"/>
  <Description DefaultValue="For testing purposes only"/>
  <IconUrl DefaultValue="https://localhost:3000/assets/logo_64.png"/>
  <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/logo_128.png"/>
  <SupportUrl DefaultValue="https://www.contoso.com/help"/>
  <AppDomains>
    <AppDomain>https://contoso.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
        <Requirements>
            <bt:Sets DefaultMinVersion="1.13">
              <bt:Set Name="Mailbox"/>
            </bt:Sets>
        </Requirements>
        <Hosts>
            <Host xsi:type="MailHost">
                <DesktopFormFactor>
                    <!-- Message Read mode-->
                    <ExtensionPoint xsi:type="MessageReadCommandSurface">
                        <OfficeTab id="TabDefault">
                            <Group id="msgReadGroup">
                                <Label resid="GroupLabel"/>
                                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                                    <Label resid="TaskpaneButton.Label"/>
                                    <Supertip>
                                        <Title resid="TaskpaneButton.Label"/>
                                        <Description resid="TaskpaneButton.Tooltip"/>
                                    </Supertip>
                                    <Icon>
                                        <bt:Image size="16" resid="Icon.16x16"/>
                                        <bt:Image size="32" resid="Icon.32x32"/>
                                        <bt:Image size="80" resid="Icon.80x80"/>
                                    </Icon>
                                    <Action xsi:type="ShowTaskpane">
                                        <SourceLocation resid="Taskpane.Url"/>
                                        <!-- Enables your add-in to activate without the Reading Pane enabled or a message selected. -->
                                        <SupportsNoItemContext>true</SupportsNoItemContext>
                                    </Action>
                                </Control>
                            </Group>
                        </OfficeTab>
                    </ExtensionPoint>
                </DesktopFormFactor>
            </Host>
        </Hosts>
        <Resources>
            <bt:Images>
              <bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/logo_16.png"/>
              <bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/logo_32.png"/>
              <bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/logo_80.png"/>
            </bt:Images>
            <bt:Urls>
              <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/>
            </bt:Urls>
            <bt:ShortStrings>
              <bt:String id="GroupLabel" DefaultValue="Test walkthrough"/>
              <bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
            </bt:ShortStrings>
            <bt:LongStrings>
              <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a task pane."/>
            </bt:LongStrings>
        </Resources>
    </VersionOverrides>
</VersionOverrides>
</OfficeApp>
  1. 这是预期的行为吗?
  2. 为什么在这两种情况下,任务窗格在消息回复模式下都会消失?它与撰写消息有何不同?
outlook office365 office-js office-addins outlook-web-addins
1个回答
0
投票

对于 Web 上的 Outlook,预期行为是只要隐藏阅读窗格或未选择消息,SupportsNoItemContext 任务窗格就会关闭:https://learn.microsoft.com/en-us/office/dev /add-ins/outlook/contextless#feature-support-in-outlook-on-the-web-and-new-outlook-on-windows-preview。发生这种情况的原因是,如果没有打开阅读窗格或选择消息,用户在 UX 中就无法访问加载项按钮。这就是当您在 Outlook 网页版中撰写或回复邮件时任务窗格消失的原因。

但是,任务窗格应该可以在 Outlook 网页版中固定 - 我在我的版本中看到固定图标,但我们将继续尝试查看是否可以重现。我也会研究 Mac 上的行为(尽管回复/新撰写的差异确实与 Windows 一致,因此很可能是“按设计”)。

© www.soinside.com 2019 - 2024. All rights reserved.