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

View Formatting causing issues when added using list view webpart on modern page

Open harshdamaniahd opened this issue 7 years ago • 42 comments

Do we still have these kinds of issue ? Is there a way to fix them ? Currently i am trying to something like this : image But when i add this to modern page, it doesnt work image

When i investigated, i came to know that this is because of the following CSS image

What should i do in such scenario ? .

harshdamaniahd avatar Feb 06 '19 13:02 harshdamaniahd

I think its because of float:left used in rowFormatter { "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideColumnHeader": true, "hideSelection": true, "rowFormatter": { "elmType": "div", "style": { "display": "inline-flex", "align-items": "stretch", "padding": "8px", "margin-bottom": "16px", "max-width": "200px", "border-radius": "8px", "box-shadow": "4px 4px 8px darkgrey", "margin-right": "15px", "float": "left" }, "attributes": { "class": "ms-bgColor-neutralLighter" }, "children": [ { "elmType": "img", "attributes": { "src": "/sites/CAL/SiteAssets/Facebook.png?web=1" }, "style": { "height": "64px", "width": "64px", "border-radius": "25%" } }, { "elmType": "div", "style": { "display": "flex", "flex-wrap": "wrap", "margin-left": "10px" }, "children": [ { "elmType": "a", "txtContent": "Facebook 1", "attributes": { "class": "ms-fontSize-s ms-fontWeight-semibold", "href": "[$Link1]" } }, { "elmType": "a", "txtContent": "[$Link1.desc]", "attributes": { "class": "ms-fontSize-s ms-fontWeight-semibold", "href": "[$Link1]", "title":"[$Link1.desc]" } }, { "elmType": "a", "txtContent": "Facebook 1", "attributes": { "class": "ms-fontSize-s ms-fontWeight-semibold", "href": "[$Link1]" } }, { "elmType": "a", "txtContent": "Facebook 1", "attributes": { "class": "ms-fontSize-s ms-fontWeight-semibold", "href": "[$Link1]" } } ] } ] } }

harshdamaniahd avatar Feb 06 '19 13:02 harshdamaniahd

The Issue is still present, i need a fix here, too. You can use tile-view.json to reproduce -> on a modern webPart page it "jumps".

In my Opionen it is caused by styles not being loaded on the webpart page: grafik Uncheck the overridden min-height 0 to reproduce webpart page behaviour. also hover classes like "ms-bgColor-themePrimary--hover" dont work on webPart Page

Alternatively, write "ms-CardList" class instead of "ms-DetailsList" into the Container, it works, too

felix-krause avatar Feb 07 '19 15:02 felix-krause

problem is not limited to the webpart same issue also directly on the list view

gruering avatar May 07 '19 15:05 gruering

For now we cant do anything as this issue is with main office ui fabric css

harshdamaniahd avatar May 09 '19 09:05 harshdamaniahd

as mentioned here this is bug : https://github.com/SharePoint/sp-dev-list-formatting/issues/149

harshdamaniahd avatar May 09 '19 09:05 harshdamaniahd

The fix for this issue is done in the host application (Sharepoint) itself. It is in the deployment pipeline now and should be live in next couple of weeks!

svaibhav avatar Jun 04 '19 09:06 svaibhav

The fix for this issue is done in the host application (Sharepoint) itself. It is in the deployment pipeline now and should be live in next couple of weeks!

Thanks svaibhav, is there any way we can track when this fix begins rolling out?

furler avatar Jul 01 '19 06:07 furler

This is fixed for me:-)

harshdamaniahd avatar Jul 01 '19 06:07 harshdamaniahd

This is fixed for me:-)

Oh, wow, it is for me too. I've been waiting for this, now to remember the many times I've wanted to use it. Hope they fix the class render issue soon.

furler avatar Jul 01 '19 06:07 furler

@harshdamaniahd @furler This was rolled to 100% production around June 11, just in case you need this info.

svaibhav avatar Jul 02 '19 08:07 svaibhav

Actions don't behave the same on a SP Page as they do on a List's page:

When you place the List on a Modern Page, the actions, like defaultclick, do not function the same as they do on the actual List. For example, on the List itself, when you have the defaultclick action, it behaves like the gif for this view formatting example, where the Details Pane slides out on the right side of the page. However, on a SP Page, you are taken to an entirely different tab to view the Item details. (Same experience for Edit functionality).

marissasinai avatar Oct 18 '19 16:10 marissasinai

Duplicate of https://github.com/SharePoint/sp-dev-docs/issues/3537

PrasadKasireddy avatar Jan 22 '20 14:01 PrasadKasireddy

Duplicate of SharePoint/sp-dev-list-formatting#192 SharePoint/sp-dev-list-formatting#154 SharePoint/sp-dev-list-formatting#204

PrasadKasireddy avatar Jan 22 '20 14:01 PrasadKasireddy

Decided not to use list view formatting on Modern pages, as it works one day and stops working another day. It's very inconsistent, this annoys the customers.

harshdamaniahd avatar Jan 27 '20 09:01 harshdamaniahd

@VesaJuvonen - this issue is back again - it functionality is not stable. https://github.com/SharePoint/sp-dev-docs/issues/5213

PrasadKasireddy avatar Jan 27 '20 09:01 PrasadKasireddy

Here are the steps to reproduce this issue : Create any Sharepoint list and add the following code to format it: https://github.com/harshdamaniahd/FormattingIssue/blob/master/formattingcode.json Now add the list to page, you see something like this. The css is broken, and you also see the column header. image First thing is that column headers should not be visible image I think the problem is because of mi-height : image

harshdamaniahd avatar Jan 27 '20 10:01 harshdamaniahd

@harshdamaniahd The column header visibility fix is already in the deployment pipeline and will reach production soon. Can you confirm that this broken UI is only happening when the lists are being used as webparts and the list page are rendering just fine?

svaibhav avatar Jan 27 '20 10:01 svaibhav

@harshdamaniahd using tileProps instead of rowFormatter may work as a workaround while are work on the issue.

svaibhav avatar Jan 27 '20 10:01 svaibhav

@harshdamaniahd The column header visibility fix is already in the deployment pipeline and will reach production soon. Can you confirm that this broken UI is only happening when the lists are being used as webparts and the list page are rendering just fine?

Yes i can confirm, it only happens when list is used as webpart on a pge

harshdamaniahd avatar Jan 27 '20 11:01 harshdamaniahd

@harshdamaniahd The column header visibility fix is already in the deployment pipeline and will reach production soon. Can you confirm that this broken UI is only happening when the lists are being used as webparts and the list page are rendering just fine?

This is been coming back again and again. After few hours it appears normal again. We have big demo planned today and this will be a roadblock if it is not fixed. Atleast apply that temporary fix for now please. We regret choosing list web part with json formatting.

asifahmeds avatar Jan 27 '20 13:01 asifahmeds