sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

List Formatting - incorrect display of Gallery List Web Part / List Gallery View, html "<cf-View " appear in some users but not others

Open aaclage opened this issue 4 months ago • 5 comments

Target SharePoint environment

SharePoint Online

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

Declarative list formatting

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

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

Since yesterday started to receive info from clients about the following behavior on how Gallery View is display in SharePoint Page. This appear in Productive environment. A List Gallery View was created to display cards from left to right, with custom formatting. This custom formatting uses "height" and "width" properties to manage the Card Size. When implemented the Gallery view appear correctly in List View. Access to SharePoint Page and include List Web Part and change to view where is gallery created. When selected and publish some users can see the card with "height" and "width" properties applied, other users doesn't

List Web Part that appear correctly to users with difference with following html tag:

<cf-View data-automation ....   style="[with "height" and "width"]">

Other users doesn't appear.

Formatting sample used:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
  "height": "40px",
  "width": "120px",
  "hideSelection": true,
  "formatter": {
    "elmType": "div",
    "style": {
      "border": "1px black solid"
    },
    "children": [
      {
        "elmType": "div",
        "txtContent": "[$Title]"
      }
    ]
  }
}

Different Views output

Steps to reproduce

  1. Create a List
  2. Create a new Gallery View
  3. Gallery View > format current View
  4. Include following json
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
  "height": "40px",
  "width": "120px",
  "hideSelection": true,
  "formatter": {
    "elmType": "div",
    "style": {
      "border": "1px black solid"
    },
    "children": [
      {
        "elmType": "div",
        "txtContent": "[$Title]"
      }
    ]
  }
}
  1. Access to SharePoint Page
  2. Edit SharePoint Page
  3. Add List Web Part
  4. Select New List
  5. Change View to new Gallery View where formatting is applied
  6. Compare if SharePoint Page appear as List Gallery View (if yes ask other colleague or test with other users accounts to see if result is the same "height" and "width" properties applied).

Expected behavior

It's expected that List gallery view properties should be displayed in SharePoint page > List Web Part no only for some users but to all users.

aaclage avatar Oct 11 '24 06:10 aaclage