Skip to content

Conversation

@alekmick
Copy link
Contributor

@alekmick alekmick commented Dec 17, 2025

@sonarqubecloud
Copy link

@alekmick alekmick changed the title Ibx 11010 improve anchor links switcher IBX: 11010 improve anchor links switcher Dec 17, 2025
@alekmick alekmick requested a review from a team December 17, 2025 14:39
@ibexa-workflow-automation-1 ibexa-workflow-automation-1 bot requested review from GrabowskiM, OstafinL, albozek, dew326 and tischsoic and removed request for a team December 17, 2025 14:39

const header = doc.querySelector('.ibexa-edit-header');
const headerContainer = header?.querySelector('.ibexa-edit-header__container');
const anchorNavigationSwitcher = doc.querySelector('.ibexa-tabs--switcher');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const anchorNavigationSwitcher = doc.querySelector('.ibexa-tabs--switcher');
const anchorNavigationSwitcher = doc.querySelector('.ibexa-anchor-navigation .ibexa-tabs--switcher');

for safety, .ibexa-tabs--switcher can be used in other contexts as well

const headerBottomContainerHeight = header.offsetHeight - headerContainer?.offsetHeight;

return top + height >= headerContainer?.offsetHeight + headerBottomContainerHeight + SECTION_ADJUST_MARGIN_TOP;
const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight || 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight || 0;
const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight ?? 0;

border-top: calculateRem(1px) solid $ibexa-color-light;
position: absolute;
right: calculateRem(30px);
z-index: 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally I would use at least sth like z-index 10 to leave possibility to add sth between 0 and &__sections

color: $ibexa-color-dark-400;
align-items: center;
font-weight: 600;
border-left: 1px solid $ibexa-color-light;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
border-left: 1px solid $ibexa-color-light;
border-left: calculateRem(1px) solid $ibexa-color-light;

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants