Skip to content

Commit

Permalink
IBX-3391: Changed bs-original-title to original-title (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 authored Jul 26, 2022
1 parent c69cbbf commit 7c91298
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 55 deletions.
1 change: 0 additions & 1 deletion src/bundle/Resources/public/js/scripts/core/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@
},
{ dropdown: this },
);
this.itemsPopover._element.removeAttribute('data-bs-original-title');
this.itemsPopover._element.removeAttribute('title');

if (this.isDynamic) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
: 'body';
const iframe = document.querySelector(tooltipNode.dataset.tooltipIframeSelector);

tooltipNode.dataset.originalTitle = tooltipNode.title;

new bootstrap.Tooltip(tooltipNode, {
delay,
placement,
Expand Down
2 changes: 0 additions & 2 deletions src/bundle/Resources/public/js/scripts/sidebar/main.menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@

if (firstLevelMenuNode.classList.contains('ibexa-main-menu__navbar--collapsed')) {
item.setAttribute('title', label);
} else {
item.removeAttribute('data-bs-original-title');
}

ibexa.helpers.tooltips.parse(mainMenuNode);
Expand Down
116 changes: 76 additions & 40 deletions src/bundle/Resources/public/scss/_custom.tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,47 @@
opacity: 1;
}

&.bs-tooltip-top &__arrow {
height: calculateRem(8px);
&.bs-tooltip-top,
&[data-popper-placement='top'] {
.ibexa-tooltip__arrow {
height: calculateRem(8px);

&::before {
border-top-color: $ibexa-color-white;
&::before {
border-top-color: $ibexa-color-white;
}
}
}

&.bs-tooltip-end &__arrow {
width: calculateRem(8px);
&.bs-tooltip-end,
&[data-popper-placement='right'] {
.ibexa-tooltip__arrow {
width: calculateRem(8px);

&::before {
border-right-color: $ibexa-color-white;
&::before {
border-right-color: $ibexa-color-white;
}
}
}

&.bs-tooltip-bottom &__arrow {
height: calculateRem(8px);
&.bs-tooltip-bottom,
&[data-popper-placement='bottom'] {
.ibexa-tooltip__arrow {
height: calculateRem(8px);

&::before {
border-bottom-color: $ibexa-color-white;
&::before {
border-bottom-color: $ibexa-color-white;
}
}
}

&.bs-tooltip-start &__arrow {
width: calculateRem(8px);
&.bs-tooltip-start,
&[data-popper-placement='left'] {
.ibexa-tooltip__arrow {
width: calculateRem(8px);

&::before {
border-left-color: $ibexa-color-white;
&::before {
border-left-color: $ibexa-color-white;
}
}
}

Expand All @@ -59,27 +71,39 @@
}

&.ibexa-tooltip {
&.bs-tooltip-top .ibexa-tooltip__arrow {
&::before {
border-top-color: $ibexa-color-complementary-strong;
&.bs-tooltip-top,
&[data-popper-placement='top'] {
.ibexa-tooltip__arrow {
&::before {
border-top-color: $ibexa-color-complementary-strong;
}
}
}

&.bs-tooltip-end .ibexa-tooltip__arrow {
&::before {
border-right-color: $ibexa-color-complementary-strong;
&.bs-tooltip-end,
&[data-popper-placement='right'] {
.ibexa-tooltip__arrow {
&::before {
border-right-color: $ibexa-color-complementary-strong;
}
}
}

&.bs-tooltip-bottom .ibexa-tooltip__arrow {
&::before {
border-bottom-color: $ibexa-color-complementary-strong;
&.bs-tooltip-bottom,
&[data-popper-placement='bottom'] {
.ibexa-tooltip__arrow {
&::before {
border-bottom-color: $ibexa-color-complementary-strong;
}
}
}

&.bs-tooltip-start .ibexa-tooltip__arrow {
&::before {
border-left-color: $ibexa-color-complementary-strong;
&.bs-tooltip-start,
&[data-popper-placement='left'] {
.ibexa-tooltip__arrow {
&::before {
border-left-color: $ibexa-color-complementary-strong;
}
}
}
}
Expand All @@ -96,27 +120,39 @@
}

&.ibexa-tooltip {
&.bs-tooltip-top .ibexa-tooltip__arrow {
&::before {
border-top-color: $ibexa-color-info;
&.bs-tooltip-top,
&[data-popper-placement='top'] {
.ibexa-tooltip__arrow {
&::before {
border-top-color: $ibexa-color-info;
}
}
}

&.bs-tooltip-end .ibexa-tooltip__arrow {
&::before {
border-right-color: $ibexa-color-info;
&.bs-tooltip-end,
&[data-popper-placement='right'] {
.ibexa-tooltip__arrow {
&::before {
border-right-color: $ibexa-color-info;
}
}
}

&.bs-tooltip-bottom .ibexa-tooltip__arrow {
&::before {
border-bottom-color: $ibexa-color-info;
&.bs-tooltip-bottom,
&[data-popper-placement='bottom'] {
.ibexa-tooltip__arrow {
&::before {
border-bottom-color: $ibexa-color-info;
}
}
}

&.bs-tooltip-start .ibexa-tooltip__arrow {
&::before {
border-left-color: $ibexa-color-info;
&.bs-tooltip-start,
&[data-popper-placement='left'] {
.ibexa-tooltip__arrow {
&::before {
border-left-color: $ibexa-color-info;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Component/LeftMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class LeftMenu extends Component
public function goToTab(string $tabName): void
{
$buttonCriteron = new LogicalOrCriterion([
new ElementAttributeCriterion('data-bs-original-title', $tabName),
new ElementAttributeCriterion('data-original-title', $tabName),
new ElementTextCriterion($tabName),
]);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/Behat/Component/Table/TableRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ protected function specifyLocators(): array
return [
new VisibleCSSLocator('link', 'a'),
new VisibleCSSLocator('checkbox', 'input[type=checkbox]'),
new VisibleCSSLocator('assign', '[data-bs-original-title="Assign content"],[data-bs-original-title="Assign to Users/Groups"]'),
new VisibleCSSLocator('edit', '.ibexa-icon--edit,[data-bs-original-title="Edit"]'),
new VisibleCSSLocator('assign', '[data-original-title="Assign content"],[data-original-title="Assign to Users/Groups"]'),
new VisibleCSSLocator('edit', '.ibexa-icon--edit,[data-original-title="Edit"]'),
];
}
}
2 changes: 1 addition & 1 deletion src/lib/Behat/Component/UniversalDiscoveryWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function isBookmarked(): bool
public function changeTab($tabName): void
{
$this->getHTMLPage()->findAll($this->getLocator('categoryTabSelector'))
->getByCriterion(new ElementAttributeCriterion('data-bs-original-title', $tabName))->click();
->getByCriterion(new ElementAttributeCriterion('data-original-title', $tabName))->click();
$this->getHTMLPage()->findAll($this->getLocator('selectedTab'))
->getByCriterion(new ElementAttributeCriterion('title', $tabName))->assert()->isVisible();
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/ContentTypeGroupPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('createButton', '.ibexa-icon--create'),
new VisibleCSSLocator('listHeader', '.ibexa-table-header .ibexa-table-header__headline, header .ibexa-table__headline, header h5'),
new VisibleCSSLocator('tableContainer', '.ibexa-container'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-bs-original-title^="Delete"]'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-original-title^="Delete"]'),
new VisibleCSSLocator('tableItem', '.ibexa-main-container tbody tr'),
new VisibleCSSLocator('contentTypeLabel', '.ibexa-table__cell > a'),
];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/ContentTypeGroupsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'),
new VisibleCSSLocator('listHeader', '.ibexa-table-header .ibexa-table-header__headline, header .ibexa-table__headline, header h5'),
new VisibleCSSLocator('createButton', '.ibexa-icon--create'),
new VisibleCSSLocator('trashButton', '.ibexa-icon--trash,button[data-bs-original-title^="Delete"]'),
new VisibleCSSLocator('trashButton', '.ibexa-icon--trash,button[data-original-title^="Delete"]'),
];
}
}
6 changes: 3 additions & 3 deletions src/lib/Behat/Page/LanguagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ protected function specifyLocators(): array
{
return [
new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'),
new VisibleCSSLocator('deleteButton', 'button[data-bs-original-title="Delete language"]'),
new VisibleCSSLocator('editButton', '[data-bs-original-title="Edit"]'),
new VisibleCSSLocator('enabledField', 'input[data-bs-original-title="Enabled"]'),
new VisibleCSSLocator('deleteButton', 'button[data-original-title="Delete language"]'),
new VisibleCSSLocator('editButton', '[data-original-title="Edit"]'),
new VisibleCSSLocator('enabledField', 'input[data-original-title="Enabled"]'),
];
}
}
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/LanguagesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'),
new VisibleCSSLocator('listHeader', '.ibexa-table-header .ibexa-table-header__headline, header .ibexa-table__headline, header h5'),
new VisibleCSSLocator('createButton', '.ibexa-icon--create'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-bs-original-title^="Delete"]'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-original-title^="Delete"]'),
];
}
}
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/SectionsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function specifyLocators(): array
return [
new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'),
new VisibleCSSLocator('createButton', '.ibexa-icon--create'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-bs-original-title^="Delete"]'),
new VisibleCSSLocator('deleteButton', '.ibexa-icon--trash,button[data-original-title^="Delete"]'),
new VisibleCSSLocator('tableContainer', '.ibexa-container'),
new VisibleCSSLocator('scrollableContainer', '.ibexa-back-to-top-scroll-container'),
];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/UserSettingsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function openAutosaveDraftEditionPage(): void
$this->getHTMLPage()
->findAll(new VisibleCSSLocator('settingsSection', '#ibexa-tab-my-preferences .ibexa-details'))
->getByCriterion(new ChildElementTextCriterion(new VisibleCSSLocator('settingHeader', '.ibexa-table-header'), 'Edit Content'))
->find(new VisibleCSSLocator('editButton', '[data-bs-original-title="Edit"]'))
->find(new VisibleCSSLocator('editButton', '[data-original-title="Edit"]'))
->click();
}

Expand Down

0 comments on commit 7c91298

Please sign in to comment.