Open
Conversation
91661c5 to
71cb76a
Compare
9230e03 to
5c621ee
Compare
1836d5b to
9a78cd9
Compare
|
konradoboza
reviewed
Apr 17, 2026
| use Twig\Extension\AbstractExtension; | ||
| use Twig\Extension\GlobalsInterface; | ||
|
|
||
| final class RtlExtension extends AbstractExtension implements GlobalsInterface |
Contributor
There was a problem hiding this comment.
Twig Extension is fine, but would it make sense to implement it as ibexa.admin_ui.config.provider?
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
At the moment we don't need anything more than what we have :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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: