Skip to content

IBX-11487: RTL#1866

Open
OstafinL wants to merge 9 commits intomainfrom
IBX-11487-RTL
Open

IBX-11487: RTL#1866
OstafinL wants to merge 9 commits intomainfrom
IBX-11487-RTL

Conversation

@OstafinL
Copy link
Copy Markdown
Contributor

@OstafinL OstafinL commented Mar 30, 2026

🎫 Issue IBX-11487

Description:

The encore_entry_link_tags Twig helper is decorated with an RtlEntrypointLookup wrapper that intercepts CSS file resolution at runtime. When RTL mode is active, the lookup applies the following resolution strategy for each entry:

RTL replacement — before loading CSS for a given entry (e.g. ibexa-admin-ui-layout-css), it checks whether a dedicated RTL entry exists under the name -rtl (e.g. ibexa-admin-ui-layout-css-rtl). If found, the RTL entry replaces the original one entirely.

Override merging — additionally, it checks for an override entry named -override-rtl-css (e.g. ibexa-admin-ui-layout-css-override-rtl-css). If this entry exists, its CSS files are merged on top of the resolved entry (either the original or its -rtl replacement). This allows projects to register custom RTL corrections without replacing the full base stylesheet.

Both lookups are non-throwing — if the entry does not exist in entrypoints.json, it is silently skipped. This gives bundle authors a predictable, opt-in RTL extension points for each CSS entry point.

For QA:

Documentation:

@OstafinL OstafinL force-pushed the IBX-11487-RTL branch 2 times, most recently from 91661c5 to 71cb76a Compare March 31, 2026 11:21
@OstafinL OstafinL force-pushed the IBX-11487-RTL branch 11 times, most recently from 9230e03 to 5c621ee Compare April 3, 2026 12:02
@OstafinL OstafinL force-pushed the IBX-11487-RTL branch 4 times, most recently from 1836d5b to 9a78cd9 Compare April 13, 2026 14:40
@barw4 barw4 self-assigned this Apr 16, 2026
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Comment thread src/bundle/Asset/RtlEntrypointLookup.php
use Twig\Extension\AbstractExtension;
use Twig\Extension\GlobalsInterface;

final class RtlExtension extends AbstractExtension implements GlobalsInterface
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Twig Extension is fine, but would it make sense to implement it as ibexa.admin_ui.config.provider?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the ibexa.admin_ui.config.provider is a better place to have it, indeed.

However, the question arises, would we need any more functions in this extension @OstafinL? If not, I'll move it into provider config

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

At the moment we don't need anything more than what we have :)

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

Labels

Feature New feature request Ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants