Skip to content

Conversation

@arvislacis
Copy link
Contributor

@arvislacis arvislacis commented Dec 30, 2025

This PR primary focuses on fixing #108 issue where language copy drop-down would overlap the repeater form fields which would then become inaccessible for editing.

Additional changes made:

  • Added title string for copy language drop-down element in mobile views (without it in mobile views there was a empty border at the top);
  • Removed redudant styling for copy language drop-down (like duplicate width, unified hex color code notation);
  • Additionally updated Latvian language translations with missing strings from the previous commits in English locale + added the new string.

P.S. Not related to this PR but I found out that copy language and multi-language switch looks a bit weird under CMS page management section (see the image below) so it should be fixed, improved later (probably in another PR):

2025-12-30_10-57

Summary by CodeRabbit

  • New Features

    • Added Latvian localization and new translation strings, including a clearer "Copy from another locale" label
    • Locale-copy dropdown now exposes a title attribute for improved labeling
  • Style

    • Refined multilingual control styling: fixed button width, adjusted dropdown sizing and positioning, and minor color normalization

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 30, 2025

Walkthrough

Separated copy-specific CSS from shared button/dropdown styles, adjusted dropdown sizing/positioning, added translation keys for copy UI in English and Latvian, and added a translated dropdown title attribute in the locale copy partial.

Changes

Cohort / File(s) Change Summary
CSS Dropdown & Button
assets/css/multilingual.css, assets/less/multilingual.less
Split .ml-copy-btn from .ml-btn; separated .ml-copy-dropdown rules from .ml-dropdown; removed height:100% from dropdowns and changed button width to 44px; minor color casing normalization.
English Localization
lang/en/lang.php
Added copy_from_label => 'Copy from another locale' in the locale array.
Latvian Localization
lang/lv/lang.php
Added label, label_plural, and copy-related keys: copy_from, copy_from_label, copy_confirm.
Locale Copy Partial
traits/mlcontrol/partials/_locale_copy.htm
Added data-dropdown-title attribute to the copy dropdown UL, bound to the translated copy-from label.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references both main aspects of the PR: the dropdown improvements and Latvian translations.
Linked Issues check ✅ Passed The PR addresses issue #108 by removing height:100% from .ml-copy-dropdown and adjusting dropdown layout to prevent overlapping with form fields.
Out of Scope Changes check ✅ Passed All changes directly relate to fixing the dropdown overlap issue and adding necessary translation strings; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf46438 and 0718fce.

📒 Files selected for processing (2)
  • assets/css/multilingual.css
  • assets/less/multilingual.less
🚧 Files skipped from review as they are similar to previous changes (1)
  • assets/css/multilingual.css
🔇 Additional comments (2)
assets/less/multilingual.less (2)

165-165: LGTM – Hex color formatting improved.

Lowercasing the hex color code improves consistency with CSS/Less conventions.


25-38: Excellent fix for the overlay issue.

Removing height: 100% from the base dropdown rules resolves issue #108 where the dropdown occupied full height even when hidden, blocking access to adjacent form controls. The specific height constraints (e.g., height: 3px at lines 69, 117) remain in place for contexts where minimal closed height is needed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@damsfx
Copy link
Contributor

damsfx commented Dec 30, 2025

@arvislacis Rather than modifying the compiled CSS file, I believe it is preferable to modify the source file assets/less/multilingual.less so that the changes are persistent.

@arvislacis
Copy link
Contributor Author

@damsfx Yeah, sorry, forgot about source .less file because initially I was testing changes in browser and it referenced a .css file. I will try to apply changes in .less file too and then recompile the .css version.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
assets/less/multilingual.less (1)

28-28: Verify width inconsistency between buttons and dropdown containers.

The buttons (.ml-btn, .ml-copy-btn) are set to 44px width via the .multilingual-button-style() mixin, while the dropdown containers (.ml-dropdown, .ml-copy-dropdown) are 42px width. Given that the button has right: 1px and position: absolute (line 161), it extends further left than the dropdown positioned at right: 0, creating potential misalignment between these sibling elements.

Confirm this width difference is intentional.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf46438 and 0718fce.

📒 Files selected for processing (2)
  • assets/css/multilingual.css
  • assets/less/multilingual.less
🚧 Files skipped from review as they are similar to previous changes (1)
  • assets/css/multilingual.css
🔇 Additional comments (2)
assets/less/multilingual.less (2)

165-165: LGTM – Hex color formatting improved.

Lowercasing the hex color code improves consistency with CSS/Less conventions.


25-38: Excellent fix for the overlay issue.

Removing height: 100% from the base dropdown rules resolves issue #108 where the dropdown occupied full height even when hidden, blocking access to adjacent form controls. The specific height constraints (e.g., height: 3px at lines 69, 117) remain in place for contexts where minimal closed height is needed.

@arvislacis
Copy link
Contributor Author

@damsfx Applied changes to source assets/less/multilingual.less file instead.

@arvislacis
Copy link
Contributor Author

@LukeTowers @mjauvin Any feedback on this?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants