[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Wiki links: Prevent preview popovers from blocking nearby links
"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a9213eb4a2a1_3818e19c1936f@gitlab-sidekiq-low-urgency-cpu-bound-v2-f95b54ddf-fdv6x.mail> |
ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
3f68935d by UshindiG at 2026-08-28T22:48:56+00:00
[FIX] Wiki links: Prevent preview popovers from blocking nearby links
---
* [FIX] Wiki links: Prevent preview popovers from blocking nearby links
See merge request tikiwiki/tiki!11085
- - - - -
2 changed files:
- lib/core/WikiParser/OutputLink.php
- lib/test/Core/WikiParser/OutputLinkTest.php
Changes:
=====================================
lib/core/WikiParser/OutputLink.php
=====================================
@@ -100,6 +100,7 @@ class WikiParser_OutputLink
[
'href' => call_user_func($this->wikiBuilder, $pageId) . $this->anchor,
'data-bs-content' => $this->getTitle($info),
+ 'data-bs-custom-class' => 'pe-none',
'class' => 'wiki wiki_page tips',
]
);
@@ -129,6 +130,7 @@ class WikiParser_OutputLink
[
'href' => call_user_func($this->wikiBuilder, $pageId) . $this->anchor,
'data-bs-content' => $this->getTitle($info),
+ 'data-bs-custom-class' => 'pe-none',
'class' => 'wiki wiki_page tips',
]
);
=====================================
lib/test/Core/WikiParser/OutputLinkTest.php
=====================================
@@ -77,7 +77,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setWikiLookup([$this, 'getPageInfo']);
$link->setWikiLinkBuilder([$this, 'getWikiLink']);
- $this->assertLinkIs('<a href="TestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSize" data-bs-content="Testing" class="wiki wiki_page tips">TestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeTHISMUSTBETRIMMED</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="TestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSize" data-bs-content="Testing" data-bs-custom-class="pe-none" class="wiki wiki_page tips">TestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeOfTheDatabaseTestWithAVeryBigNameThatExceedsTheColumnSizeTHISMUSTBETRIMMED</a>', $link->getHtml());
}
public function testPageDoesExist()
@@ -93,7 +93,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setWikiLookup([$this, 'getPageInfo']);
$link->setWikiLinkBuilder([$this, 'getWikiLink']);
- $this->assertLinkIs('<a href="Test" data-bs-content="Testing" class="wiki wiki_page tips">Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="Test" data-bs-content="Testing" data-bs-custom-class="pe-none" class="wiki wiki_page tips">Test</a>', $link->getHtml());
}
public function testInfoFunctionProvidesAlias()
@@ -109,7 +109,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setWikiLookup([$this, 'getPageInfo']);
$link->setWikiLinkBuilder([$this, 'getWikiLink']);
- $this->assertLinkIs('<a href="Test1.2" data-bs-content="Testing" class="wiki wiki_page tips">Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="Test1.2" data-bs-content="Testing" data-bs-custom-class="pe-none" class="wiki wiki_page tips">Test</a>', $link->getHtml());
}
public function testExistsWithRelType()
@@ -126,7 +126,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setWikiLookup([$this, 'getPageInfo']);
$link->setWikiLinkBuilder([$this, 'getWikiLink']);
- $this->assertLinkIs('<a href="Test" data-bs-content="Testing" class="wiki wiki_page tips abc">Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="Test" data-bs-content="Testing" data-bs-custom-class="pe-none" class="wiki wiki_page tips abc">Test</a>', $link->getHtml());
}
public function testUndefinedExternalLink()
@@ -183,7 +183,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setWikiLinkBuilder([$this, 'getWikiLink']);
$link->setHandlePlurals(true);
- $this->assertLinkIs('<a href="Policy" data-bs-content="Some Page" class="wiki wiki_page tips">Policies</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="Policy" data-bs-content="Some Page" data-bs-custom-class="pe-none" class="wiki wiki_page tips">Policies</a>', $link->getHtml());
}
public function testRenderCreateLinkWithNamespace()
@@ -214,7 +214,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setNamespace('HelloWorld', '_');
$link->setIdentifier('Test');
- $this->assertLinkIs('<a href="HelloWorld_Test" data-bs-content="HelloWorld / Test" class="wiki wiki_page tips">Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="HelloWorld_Test" data-bs-content="HelloWorld / Test" data-bs-custom-class="pe-none" class="wiki wiki_page tips">Test</a>', $link->getHtml());
}
public function testRenderFromDifferentNamespace()
@@ -235,7 +235,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setNamespace('Foobar', '_');
$link->setIdentifier('HelloWorld_Test');
- $this->assertLinkIs('<a href="HelloWorld_Test" data-bs-content="HelloWorld / Test" class="wiki wiki_page tips"><span class="namespace first last">HelloWorld</span>Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="HelloWorld_Test" data-bs-content="HelloWorld / Test" data-bs-custom-class="pe-none" class="wiki wiki_page tips"><span class="namespace first last">HelloWorld</span>Test</a>', $link->getHtml());
}
public function testRenderFromDifferentNamespaceWithMultipleParts()
@@ -256,7 +256,7 @@ class WikiParser_OutputLinkTest extends TikiTestCase
$link->setNamespace('Foobar', '_');
$link->setIdentifier('Abc_Def_HelloWorld_Test');
- $this->assertLinkIs('<a href="Abc_Def_HelloWorld_Test" data-bs-content="Abc / Def / HelloWorld / Test" class="wiki wiki_page tips"><span class="namespace first">Abc</span><span class="namespace">Def</span><span class="namespace last">HelloWorld</span>Test</a>', $link->getHtml());
+ $this->assertLinkIs('<a href="Abc_Def_HelloWorld_Test" data-bs-content="Abc / Def / HelloWorld / Test" data-bs-custom-class="pe-none" class="wiki wiki_page tips"><span class="namespace first">Abc</span><span class="namespace">Def</span><span class="namespace last">HelloWorld</span>Test</a>', $link->getHtml());
}
public function getPageInfo($page)
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3f68935d6bf0552f4819522825fb380c34ab0a01
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3f68935d6bf0552f4819522825fb380c34ab0a01
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs