OfficeDev/office-js

Excel web showing duplicate add-in popup menus

Opened this issue · 3 comments

I have a command add-in that adds a menu item with multiple child items to the Excel cell popup menu. The menu items is displayed OK, but all the child items appear twice, once in Bold, once in plain text, both lines showing the same label:

image

The menu items should be displayed the same as all the other Excel sub-menus, i.e. once and in plain text.

The manifest xml for that menu item is:

							<Control xsi:type="Menu" id="OfficeAddins.CopyListMenu">
								<Label resid="OffAdd.CL.Menu.Label" />
								<Supertip>
									<Title resid="OffAdd.CL.Menu.Title"/>
									<Description resid="OffAdd.CL.Menu.Description"/>
								</Supertip>
								<Icon>
									<bt:Image size="16" resid="OffAdd.menuicon_16x16" />
									<bt:Image size="32" resid="OffAdd.menuicon_32x32" />
									<bt:Image size="64" resid="OffAdd.menuicon_64x64" />
									<bt:Image size="80" resid="OffAdd.menuicon_80x80" />
								</Icon>
								<Items>
									<Item id="OffAdd.CL.Options">
										<Label resid="OffAdd.CL.Options.Label" />
										<Supertip>
											<Title resid="OffAdd.CL.Options.Title" />
											<Description resid="OffAdd.CL.Options.Tooltip" />
										</Supertip>
										<Icon>
											<bt:Image size="16" resid="OffAdd.blank_16x16" />
											<bt:Image size="32" resid="OffAdd.blank_16x16" />
											<bt:Image size="80" resid="OffAdd.blank_16x16" />
										</Icon>
										<Action xsi:type="ShowTaskpane">
											<TaskpaneId>OATaskPane</TaskpaneId>
											<SourceLocation resid="Taskpane.Url" />
										</Action>
									</Item>

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Office on the web
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: Office.com
  • Operating System: Windows 11
  • Browser (if using Office on the web): Chrome

Expected behavior

The submenu items show up once, in plain text

Current behavior

Each menu shows up twice, once in bold, once in plain text, with the same text

Steps to reproduce

  1. Create a minimal manifest with a menu and sub-menu on the Cell popup
  2. Load the addin in Excel on the web
  3. Right-click to show the menus
  4. Look at the duplicated text

Link to live example(s)

The Add-in is in dev, happy to share the full manifest xml privately for sideloading.

Context

I'm trying to provide a new add-in for Excel and it looks very silly on the web version

Hi @CBullen2 Thanks for report this issue. Could you please provide us the whole manifest? And I also found a codeSamples to create command add-in, maybe you can try this to see if it works https://learn.microsoft.com/en-us/samples/officedev/pnp-officeaddins/excel-add-in-commands/

Sure, I took that sample and added a popup menu to the manifest:

<?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:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
	<Id>1752701e-e44f-496d-b4cc-3f3144491978</Id>
	<Version>1.0.0.0</Version>
	<ProviderName>Contoso</ProviderName>
	<DefaultLocale>en-US</DefaultLocale>
	<DisplayName DefaultValue="excel-add-in-commands"/>
	<Description DefaultValue="A template to get started."/>
	<IconUrl DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/assets/icon-32.png"/>
	<HighResolutionIconUrl DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/assets/icon-64.png"/>
	<SupportUrl DefaultValue="https://learn.microsoft.com/office/dev/add-ins/develop/create-addin-commands"/>
	<AppDomains>
		<AppDomain>https://officedev.github.io</AppDomain>
	</AppDomains>
	<Hosts>
		<Host Name="Workbook"/>
	</Hosts>
	<DefaultSettings>
		<SourceLocation DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/taskpane/taskpane.html"/>
	</DefaultSettings>
	<Permissions>ReadWriteDocument</Permissions>
	<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
		<Hosts>
			<Host xsi:type="Workbook">
				<DesktopFormFactor>
					<GetStarted>
						<!-- Title of the Getting Started callout. The resid attribute points to a ShortString resource -->
						<Title resid="Contoso.GetStarted.Title"/>
						<!-- Description of the Getting Started callout. resid points to a LongString resource -->
						<Description resid="Contoso.GetStarted.Description"/>
						<!-- Points to a URL resource which details how the add-in should be used. -->
						<LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
					</GetStarted>
					<FunctionFile resid="Commands.Url"/>
					<ExtensionPoint xsi:type="PrimaryCommandSurface">
						<OfficeTab id="TabHome">
							<!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
							<Group id="Contoso.Group1">
								<!-- Label for your group. resid must point to a ShortString resource. -->
								<Label resid="Contoso.Group1Label"/>
								<!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
								<!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
								<Icon>
									<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
									<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
									<bt:Image size="80" resid="Contoso.tpicon_80x80"/>
								</Icon>
								<!-- Control. It can be of type "Button" or "Menu". -->
								<Control xsi:type="Button" id="Contoso.TaskpaneButton">
									<Label resid="Contoso.TaskpaneButton.Label"/>
									<Supertip>
										<!-- ToolTip title. resid must point to a ShortString resource. -->
										<Title resid="Contoso.TaskpaneButton.Label"/>
										<!-- ToolTip description. resid must point to a LongString resource. -->
										<Description resid="Contoso.TaskpaneButton.Tooltip"/>
									</Supertip>
									<Icon>
										<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
										<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
										<bt:Image size="80" resid="Contoso.tpicon_80x80"/>
									</Icon>
									<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
									<Action xsi:type="ShowTaskpane">
										<TaskpaneId>ButtonId1</TaskpaneId>
										<!-- Provide a URL resource id for the location that will be displayed on the task pane. -->
										<SourceLocation resid="Contoso.Taskpane.Url"/>
									</Action>
								</Control>
								<Control xsi:type="Menu" id="Contoso.Menu">
									<Label resid="Contoso.Menu.Label"/>
									<Supertip>
										<Title resid="Contoso.Menu.Label"/>
										<Description resid="Contoso.Menu.Tooltip"/>
									</Supertip>
									<Icon>
										<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
										<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
										<bt:Image size="80" resid="Contoso.tpicon_80x80"/>
									</Icon>
									<Items>
										<Item id="itemShowTaskPane">
											<Label resid="Contoso.Item1.Label"/>
											<Supertip>
												<Title resid="Contoso.Item1.Label"/>
												<Description resid="Contoso.Item1.Tooltip"/>
											</Supertip>
											<Icon>
												<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
												<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
												<bt:Image size="80" resid="Contoso.tpicon_80x80"/>
											</Icon>
											<Action xsi:type="ShowTaskpane">
												<TaskpaneId>ButtonId1</TaskpaneId>
												<SourceLocation resid="Contoso.Taskpane.Url"/>
											</Action>
										</Item>
										<Item id="itemExecuteFunction">
											<Label resid="Contoso.Item2.Label"/>
											<Supertip>
												<Title resid="Contoso.Item2.Label"/>
												<Description resid="Contoso.Item2.Tooltip"/>
											</Supertip>
											<Icon>
												<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
												<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
												<bt:Image size="80" resid="Contoso.tpicon_80x80"/>
											</Icon>
											<Action xsi:type="ExecuteFunction">
												<FunctionName>writeValue</FunctionName>
											</Action>
										</Item>
									</Items>
								</Control>
							</Group>
						</OfficeTab>
					</ExtensionPoint>
					<ExtensionPoint xsi:type="ContextMenu">
						<OfficeMenu id="ContextMenuCell">
							<Control xsi:type="Menu" id="PopupMenu">
								<Label resid="PopupMenu.Label"/>
								<Supertip>
									<Title resid="PopupMenu.ST.Label"/>
									<Description resid="PopupMenu.ST.Description"/>
								</Supertip>
								<Icon>
									<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
									<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
								</Icon>
								<Items>
									<Item id="PopupMenu.Menu1">
										<Label resid="PopupMenu.Menu1.Label"/>
										<Supertip>
											<Title resid="PopupMenu.Menu1.ST.Label"/>
											<Description resid="PopupMenu.Menu1.ST.Description"/>
										</Supertip>
										<Icon>
											<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
											<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
										</Icon>
										<Action xsi:type="ExecuteFunction">
											<FunctionName>writeValue</FunctionName>
										</Action>
									</Item>
									<Item id="PopupMenu.Menu2">
										<Label resid="PopupMenu.Menu2.Label"/>
										<Supertip>
											<Title resid="PopupMenu.Menu2.ST.Label"/>
											<Description resid="PopupMenu.Menu2.ST.Description"/>
										</Supertip>
										<Icon>
											<bt:Image size="16" resid="Contoso.tpicon_16x16"/>
											<bt:Image size="32" resid="Contoso.tpicon_32x32"/>
										</Icon>
										<Action xsi:type="ExecuteFunction">
											<FunctionName>writeValue</FunctionName>
										</Action>
									</Item>								
								</Items>
							</Control>
						</OfficeMenu>
					</ExtensionPoint>
				</DesktopFormFactor>
			</Host>
		</Hosts>
		<Resources>
			<bt:Images>
				<bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/assets/icon-16.png"/>
				<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/assets/icon-32.png"/>
				<bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/assets/icon-80.png"/>
			</bt:Images>
			<bt:Urls>
				<bt:Url id="Commands.Url" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/src/commands/commands.html"/>
				<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://officedev.github.io/Office-Add-in-samples/Samples/office-add-in-commands/excel/src/taskpane/taskpane.html"/>
				<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812"/>
			</bt:Urls>
			<!-- ShortStrings max characters==125. -->
			<bt:ShortStrings>
				<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show task pane"/>
				<bt:String id="Contoso.WriteValueButton.Label" DefaultValue="Show task pane"/>
				<bt:String id="Contoso.Item1.Label" DefaultValue="Show task pane"/>
				<bt:String id="Contoso.Item2.Label" DefaultValue="Write value"/>
				<bt:String id="Contoso.Menu.Label" DefaultValue="Dropdown menu"/>
				<bt:String id="Contoso.Group1Label" DefaultValue="Commands group"/>
				<bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!"/>
				<bt:String id="PopupMenu.Label" DefaultValue="Popup Menu"/>
				<bt:String id="PopupMenu.ST.Label" DefaultValue="Popup Menu Supertip"/>
				<bt:String id="PopupMenu.Menu1.Label" DefaultValue="Menu Item 1"/>
				<bt:String id="PopupMenu.Menu1.ST.Label" DefaultValue="Menu Item 1 Supertip"/>
				<bt:String id="PopupMenu.Menu2.Label" DefaultValue="Menu Item 2"/>
				<bt:String id="PopupMenu.Menu2.ST.Label" DefaultValue="Menu Item 2 Supertip"/>
			</bt:ShortStrings>
			<!-- LongStrings max characters==250. -->
			<bt:LongStrings>
				<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Choose to show a task pane"/>
				<bt:String id="Contoso.Item1.Tooltip" DefaultValue="Choose to show a task pane"/>
				<bt:String id="Contoso.Item2.Tooltip" DefaultValue="Choose to show a task pane"/>
				<bt:String id="Contoso.Menu.Tooltip" DefaultValue="Show the dropdown menu"/>
				<bt:String id="Contoso.WriteValueButton.Tooltip" DefaultValue="Choose to write value to document"/>
				<bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and choose the 'Show task pane' button to get started."/>
				<bt:String id="PopupMenu.ST.Description" DefaultValue="Popup Menu Supertip Description"/>
				<bt:String id="PopupMenu.Menu1.ST.Description" DefaultValue="Menu Item 1 Supertip Description"/>
				<bt:String id="PopupMenu.Menu2.ST.Description" DefaultValue="Menu Item 2 Supertip Description"/>
			</bt:LongStrings>
		</Resources>
	</VersionOverrides>
</OfficeApp>

Then sideloaded it in Excel web, right-clicked the cell and got this:

Right-click image

And I just noticed the icons aren't being displayed either !

Hi @CBullen2 This is a known issue: #4212, we have created a bug <#9070195> to triage. We unfortunately have no timelines to share at this point.