sp-dev-docs
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
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]"
}
]
}
}
Steps to reproduce
- Create a List
- Create a new Gallery View
- Gallery View > format current View
- 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]"
}
]
}
}
- Access to SharePoint Page
- Edit SharePoint Page
- Add List Web Part
- Select New List
- Change View to new Gallery View where formatting is applied
- 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.