-
Notifications
You must be signed in to change notification settings - Fork 21
IBX-11487: RTL #1866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
OstafinL
wants to merge
14
commits into
5.0
Choose a base branch
from
IBX-11487-RTL
base: 5.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
IBX-11487: RTL #1866
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c2222eb
rlt poc
OstafinL bf42ad4
IBX-11487: Refactored backend
barw4 1fbb200
rlt poc
OstafinL 883c70d
IBX-11487: Refactored backend
barw4 838c50f
Merge remote-tracking branch 'origin/IBX-11487-RTL' into IBX-11487-RTL
barw4 d12bcca
IBX-11487: Override RTL css files
barw4 db48a69
IBX-11487: Updated tests
barw4 a687ecf
Frontend refactoring
OstafinL fa6bf16
IBX-11487: Updated tests
barw4 abd3b8b
IBX-11487: Moved rtl param into a config provider value
barw4 94e6de0
IBX-11487: Rename
barw4 61cad39
Fixed frontend build
OstafinL eeb0e62
Fixed tabs css
OstafinL 5f64db7
Fixed rtl override files
OstafinL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
| * @license For full copyright and license information view LICENSE file distributed with this source code. | ||
| */ | ||
| declare(strict_types=1); | ||
|
|
||
| namespace Ibexa\Bundle\AdminUi\Asset; | ||
|
|
||
| use Ibexa\Contracts\AdminUi\Rtl\RtlModeResolverInterface; | ||
| use Symfony\WebpackEncoreBundle\Asset\EntrypointLookup; | ||
| use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupInterface; | ||
| use Symfony\WebpackEncoreBundle\Asset\IntegrityDataProviderInterface; | ||
|
|
||
| final readonly class RtlEntrypointLookup implements EntrypointLookupInterface, IntegrityDataProviderInterface | ||
| { | ||
| public function __construct( | ||
| private EntrypointLookupInterface $inner, | ||
| private RtlModeResolverInterface $rtlModeResolver, | ||
| ) { | ||
| } | ||
|
|
||
| /** | ||
| * @return array<string> | ||
| */ | ||
| public function getJavaScriptFiles(string $entryName): array | ||
| { | ||
| return $this->inner->getJavaScriptFiles($entryName); | ||
| } | ||
|
|
||
| /** | ||
| * @return array<string> | ||
| */ | ||
| public function getCssFiles(string $entryName): array | ||
| { | ||
| if (!$this->rtlModeResolver->isRtl()) { | ||
| return $this->inner->getCssFiles($entryName); | ||
| } | ||
|
|
||
| if ($this->entryExists($entryName . '-rtl')) { | ||
| $entryName .= '-rtl'; | ||
| } | ||
|
|
||
| $files = $this->inner->getCssFiles($entryName); | ||
|
|
||
| $overrideEntryName = $entryName . '-override-rtl-css'; | ||
| if ($this->entryExists($overrideEntryName)) { | ||
| $files = array_merge($files, $this->inner->getCssFiles($overrideEntryName)); | ||
| } | ||
|
|
||
| return $files; | ||
| } | ||
|
|
||
| private function entryExists(string $entryName): bool | ||
| { | ||
| if ($this->inner instanceof EntrypointLookup) { | ||
| return $this->inner->entryExists($entryName); | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
|
|
||
| /** | ||
| * @return array<string, string> | ||
| */ | ||
| public function getIntegrityData(): array | ||
| { | ||
| if ($this->inner instanceof IntegrityDataProviderInterface) { | ||
| return $this->inner->getIntegrityData(); | ||
| } | ||
|
|
||
| return []; | ||
| } | ||
|
|
||
| public function reset(): void | ||
| { | ||
| $this->inner->reset(); | ||
| } | ||
| } | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| services: | ||
| _defaults: | ||
| autowire: true | ||
| autoconfigure: true | ||
| public: false | ||
|
|
||
| Ibexa\AdminUi\UI\Config\Provider\IsRtl: | ||
| tags: | ||
| - { name: ibexa.admin_ui.config.provider, key: 'isRtl' } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module.exports = { | ||
| excludedFiles: ['ibexa-admin-ui-layout-css-override-rtl-css.css', 'ibexa-admin-ui-layout-css-override-rtl-css.js'], | ||
| excludedEntrypoints: ['ibexa-admin-ui-layout-css-override-rtl-css'], | ||
| }; |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| @use '@ibexa-admin-ui/src/bundle/Resources/public/scss/custom.scss' as *; | ||
| @use '@ibexa-admin-ui/src/bundle/Resources/public/scss/functions/calculate.rem' as *; | ||
|
|
||
| [dir='rtl'] { | ||
| .ibexa-theme { | ||
| .ibexa-tabs.ibexa-tabs { | ||
| &:not(.ibexa-tabs--switcher) { | ||
| .ibexa-tabs { | ||
| &__tab-corner { | ||
| transform: rotateY(180deg); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .ibexa-header-user-menu { | ||
| justify-content: left; | ||
| } | ||
|
|
||
| .ibexa-main-menu { | ||
| &__navbar { | ||
| &--second-level { | ||
| &.ibexa-main-menu__navbar--collapsed { | ||
| .ibexa-main-menu { | ||
| &__toggler { | ||
| .ibexa-icon { | ||
| transform: rotateY(0deg); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| &__toggler { | ||
| margin-left: calculateRem(6px); | ||
|
|
||
| .ibexa-icon { | ||
| transform: rotateY(180deg); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .ibexa-tooltip { | ||
| &--navigation { | ||
| &.bs-tooltip-start, | ||
| &[data-popper-placement='left'] { | ||
| .ibexa-tooltip__arrow { | ||
| &::before { | ||
| border-left-color: $ibexa-color-complementary-primary-400; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .ibexa-back-to-top { | ||
| &__icon.ibexa-icon { | ||
| transform: rotate(90deg); | ||
| } | ||
| } | ||
|
|
||
| .flatpickr-months { | ||
| .flatpickr-next-month, | ||
| .flatpickr-prev-month { | ||
| transform: rotateY(180deg); | ||
| } | ||
| } | ||
| } | ||
| } |
3 changes: 2 additions & 1 deletion
3
src/bundle/Resources/views/themes/admin/account/base.html.twig
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
| * @license For full copyright and license information view LICENSE file distributed with this source code. | ||
| */ | ||
| declare(strict_types=1); | ||
|
|
||
| namespace Ibexa\Contracts\AdminUi\Rtl; | ||
|
|
||
| interface RtlModeResolverInterface | ||
| { | ||
| public function isRtl(): bool; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.