Skip to content

SPO Library Default View JSON Formatting doesn't work for New and others....... #10170

Open
@george-mcdonald

Description

@george-mcdonald

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

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 - Latest available versions for enterprise releases, managed via tools such as PatchMyPC, Action1 for enterprise.
  • SPFx version - N/A?
  • Node.js version - N/A?
  • etc

Describe the bug / error

JSON commands to hide NAV menu items such as "New", "Sync", etc. no longer work! They used to, as I had the below configuration in place for several months in a Dev site, the config was validated working. However, it doesn't anymore. Tested in Chrome/Edge/FF, in incognito mode.

From the below code, the following is now observed:

1.) New - When JSON is initially saved in format view, the New button Background/Outline is removed, but the button remains - (used to hide the button completely). Upon reloading the page, the background that was previously removed reappears. Outcome "New" = not working at all.
2.) Sync - Used to hide this button. Now not working at all.
3.) Automate - This still works!
4.) Integrate - This still works!
5.) Classify and extract - This still works!

This really shouldn't be that hard MS! This has been a PITA afterthought for years.

`{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "sync",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "integrate",
"hide": true
},
{
"key": "classifyAndExtract",
"hide": true
}
]
}
}

Image

`

Steps to reproduce

  1. Created an SPO Document center.
  2. Apply JSON to the "Documents" library's All Documents view.
  3. Refresh the page.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "sync",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "integrate",
"hide": true
},
{
"key": "classifyAndExtract",
"hide": true
}
]
}
}

Image

Expected behavior

Would it be too much to ask for a documented method of customizing the nav bar to work?

Metadata

Metadata

Assignees

Labels

sharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions