Skip to content

Sector Nord AG: Fixed gap caused by async widgets#607

Merged
jepf merged 1 commit intoznuny:devfrom
SectorNordAG:dev-AsyncWidgetDisplayFix
Apr 16, 2025
Merged

Sector Nord AG: Fixed gap caused by async widgets#607
jepf merged 1 commit intoznuny:devfrom
SectorNordAG:dev-AsyncWidgetDisplayFix

Conversation

@ZTrotter
Copy link
Copy Markdown
Contributor

@ZTrotter ZTrotter commented Oct 21, 2024

Proposed change

Currently, asynchronous widgets are not correctly hidden when they don't have content, resulting in gaps between the displayed widgets.

Bug

This bug can be exacerbated by installing third-party add-ons that contain asynchronous widgets that are registered but not currently displayed. In this case, the gap will grow with each additional asynchronous widget without content.

ThirdPartyBug

This PR addresses the issue by adding a check to hide any widget with empty content after it has been initialized.

Additionally, as an alternative suggestion, using the following CSS rule could also hide empty widget containers more directly:

.LayoutFixedSidebar > .SidebarColumn > div:not(:has(div)) {
    display: none;
}

This issue arises because the flexbox property for .SidebarColumn applies gap: var(--gap-md); to every element in the column, including those that should be hidden. Consequently, even when a widget is absent, the gap remains, leading to an inconsistent layout. In Znuny 6, a flexbox layout is not used; instead, each element containing the .WidgetAction class is assigned a margin-bottom: 15px;. Since the asynchronous widgets without content do not include this class, the issue of unwanted gaps does not appear in Znuny 6.

Type of change

1 - 🐞 bug 🐞

Breaking change

This PR does not introduce any breaking changes.

Additional information

To recreate bug:

  • Create a new ticket
  • Open the default "Znuny says hi!" ticket
  • Link the newly created ticket to the "Znuny says hi!" ticket
  • Navigate back to the ""Znuny says hi!"" AgentTIcketZoom
  • There will be a extra large gap between the Ticket Information and Linked Objects widgets

Checklist

  • The code change is tested and works locally.(❗)
  • There is no commented out code in this PR.(❕)
  • You improved or added new unit tests.(❕)
  • Local ZnunyCodePolicy passed.(❕)
  • Local UnitTests / Selenium passed.(❕)
  • GitHub workflow CI (UnitTests / Selenium) passed.(❗)

@dignin dignin self-assigned this Apr 11, 2025
@dignin dignin added 3 - verified This issue or pull request was verified. 3 - internal Issue/MR A Znuny internal issue/MR has been created. labels Apr 11, 2025
@jepf
Copy link
Copy Markdown
Contributor

jepf commented Apr 16, 2025

Internal issue 1090.

@jepf jepf merged commit 79b9dba into znuny:dev Apr 16, 2025
@jepf
Copy link
Copy Markdown
Contributor

jepf commented Apr 16, 2025

@ZTrotter

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - internal Issue/MR A Znuny internal issue/MR has been created. 3 - verified This issue or pull request was verified.

Development

Successfully merging this pull request may close these issues.

3 participants