Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New modern UI in document libraries: command bar view formatting does not work #10110

Open
2 of 9 tasks
NerijusV opened this issue Feb 10, 2025 · 3 comments
Open
2 of 9 tasks
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@NerijusV
Copy link

NerijusV commented Feb 10, 2025

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

None

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

  • not relevant

Describe the bug / error

Command bar formatting is not working in document libraries with new modern UI.
Command bar formatting is done using customizations through commandBarProps.

Steps to reproduce

  1. Open view format settings.
  2. Add JSON to hide few default buttons:
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      {
        "key": "new",
        "hide": false
      },
      {
        "key": "newFolder",
        "hide": false
      },
      {
        "key": "newWordDocument",
        "hide": false
      },
      {
        "key": "newExcelWorkbook",
        "hide": false
      },
      {
        "key": "newPowerPointPresentation",
        "hide": false
      },
      {
        "key": "newOneNoteNotebook",
        "hide": false
      },
      {
        "key": "newFormsForExcel",
        "hide": false
      },
      {
        "key": "newVisioDrawing",
        "hide": false
      }
    ]
  }
}
  1. Open the view

Expected behavior

  • Button section "New" should be hidden in command bar - FAIL (all butons are visible).
@NerijusV NerijusV added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Feb 10, 2025
@watana2
Copy link
Contributor

watana2 commented Feb 10, 2025

{
  "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      { "key": "new", "hide": true },
      { "key": "newFolder", "hide": true },
      { "key": "newWordDocument", "hide": true },
      { "key": "newExcelWorkbook", "hide": true },
      { "key": "newPowerPointPresentation", "hide": true },
      { "key": "newOneNoteNotebook", "hide": true },
      { "key": "newFormsForExcel", "hide": true },
      { "key": "newVisioDrawing", "hide": true }
    ]
  }
}

@NerijusV
Copy link
Author

Have tried it, but stil does not work.

@watana2
Copy link
Contributor

watana2 commented Feb 12, 2025

can you share some screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants