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

Announcements are not fully hidden #861

Open
toxxicjtag opened this issue Oct 14, 2024 · 2 comments
Open

Announcements are not fully hidden #861

toxxicjtag opened this issue Oct 14, 2024 · 2 comments
Labels
🐞 Bug Issue with one of the samples

Comments

@toxxicjtag
Copy link

Sample (which sample are you having trouble with)

Announcements

What Should Happen

The announcement ticket has been working great. It hides the rows that are between the start date and removal date columns in our sharepoint list.
image

What Actually Happens

All of a sudden, the list elements are almost hidden, but are pushing the visible announcement down. The area that has been pushed can be clicked into, and rows of the sharepoint list are open in edit mode. I hope this makes sense.
image.

FORMAT VIEW JSON

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "hideColumnHeader": true, "hideSelection": true, "rowFormatter": { "elmType": "div", "style": { "width": "300px", "padding-bottom": "20px", "display": "=if(([$StartDate] <= @now) && ([$RemoveDate] >= @now), '', 'none !important')", "visibility": "=if(([$StartDate] <= @now) && ([$RemoveDate] >= @now), '', 'hidden !important')" }, "children": [ { "elmType": "div", "style": { "border-radius": "8px", "box-shadow": "#00000022 0px 1.6px 3.6px 0px, #00000022 0px 0.3px 0.9px 0px", "display": "flex", "font-size": "1rem", "background-color": "=if([$TypeAnn] == 'Red', '#fdeded', if([$TypeAnn] == 'Green', '#edf7ed', if([$TypeAnn] == 'Yellow', '#fff4e5', '#e5f6fd')))", "line-height": "1.43", "padding": "6px 16px", "align-items": "center", "flex-flow": "wrap" }, "children": [ { "elmType": "span", "attributes": { "iconName": "=if([$TypeAnn] == 'Red', 'ErrorBadge', if([$TypeAnn] == 'Green', 'Completed', if([$TypeAnn] == 'Yellow', 'warning', 'info')))" }, "style": { "padding-right": "10px", "font-weight": "700", "color": "=if([$TypeAnn] == 'Red', '#ef5350', if([$TypeAnn] == 'Green', '#4caf50', if([$TypeAnn] == 'Yellow', '#ff9800', '#03a9f4')))" } }, { "txtContent": "[$Category]", "elmType": "div", "style": { "font-weight": "630", "margin-bottom": "0.35em", "padding-right": "5em" } }, { "elmType": "span", "style": { "font-weight": "500" }, "attributes": { "iconName": "CRMCustomerInsightsApp" }, "customCardProps": { "formatter": { "elmType": "div", "txtContent": "[$TextHover]", "style": { "display": "=if([$TextHover], 'block', 'none')", "align-items": "stretch", "border-radius": "8px", "box-shadow": "#00000022 0px 1.6px 3.6px 0px, #00000022 0px 0.3px 0.9px 0px", "background-color": "=if([$TypeAnn] == 'Red', '#fdeded', if([$TypeAnn] == 'Green', '#edf7ed', if([$TypeAnn] == 'Yellow', '#fff4e5', '#e5f6fd')))", "font-size": "1rem", "line-height": "1.43", "padding": "6px 16px", "flex-flow": "wrap" } }, "openOnEvent": "click", "directionalHint": "topCenter", "isBeakVisible": true, "beakStyle": { "background-color": "=if([$TypeAnn] == 'Red', '#fdeded', if([$TypeAnn] == 'Green', '#edf7ed', if([$TypeAnn] == 'Yellow', '#fff4e5', '#e5f6fd')))" } } }, { "elmType": "div", "txtContent": "[$Description]", "style": { "padding-left": "26px", "flex-direction": "column" } } ] } ] } }

@toxxicjtag toxxicjtag added the 🐞 Bug Issue with one of the samples label Oct 14, 2024
@tecchan1107
Copy link
Collaborator

Hi @toxxicjtag ! It was reproduced in my environment.
image

Causes announcements to be pushed down

All of a sudden, the list elements are almost hidden, but are pushing the visible announcement down.

The reason the announcement was pushed down was due to a change in the Microsoft Lists specification, or a bug, which allowed for blank space under every row.

image

This blank space is created even if the row is hidden as "display" : "none".

image

⚠️ I have created an issue in the sp-dev-docs repository and asked Microsoft about whether this blank space is a bug or a spec change. (Not sure if I will get an answer...)
SharePoint/sp-dev-docs#9971

About Measures

If you want to restore the announcement to its original position, please try using a filter to not retrieve the hidden rows.

image

However, when using filters, filter criteria will be displayed above the view....

image

@toxxicjtag
Copy link
Author

Thank you for the update. I will play around with the list filters to see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Issue with one of the samples
Projects
None yet
Development

No branches or pull requests

2 participants