SharePoint / SharePoint/sp-dev-docs

commandBarCustomization: keys from updated documentation do not work after update to SP Lists interface (hiding commands, renaming commands)

Open
#10,198 6 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Apr 21, 2025.

area:list-formatting sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

Windows

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • browser version: all latest version
Describe the bug / error
  1. there's at least one error/typo in the documentation about the commandBarCustomization keys btw: it should be 'UploadCommand' instead of 'uploadCommand'.

  2. when trying to 'rebrand' the newFolder command, we just can't get the correct key to handle it. As 'new' was changed to 'newComposite' (as per updated documentation) we tried to the the same for the 'newFolder' command, so we tried 'newCompositeFolder', 'NewCompositeFolder', 'newFolderCommand', 'NewFolderCommand', etc, but no luck.

    {
    "key": "newFolder",
    "hide": false,
    "text": "newFolder Custom name on primary level",
    "iconName": "FabricNewFolder",
    "selectionModes": [
    "NoSelection"
    ],
    "position": 1
    }

Steps to reproduce
  1. create a new list
  2. format the view formatting json with the following json code: { "key": "newCompositeFolder", "hide": false, "text": "newFolder Custom name on primary level", "iconName": "FabricNewFolder", "selectionModes": [ "NoSelection" ], "position": 1 }
  3. Nothing changes in the commandBar, the New button is visible, with newFolder as a sublevel button:

Image

Expected behavior

it should look like this, screenshot from a tenant with the 'old' SP List implementation (still includes the (i) button for the info panel on the right)

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.