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

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ZTrotter
Copy link
Contributor

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.(❗)

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

Successfully merging this pull request may close these issues.

1 participant