Skip to content

fix(rating): reverse arrow key navigation in RTL mode #4827 - #4837

Open
Gershon99 wants to merge 1 commit into
ng-bootstrap:masterfrom
Gershon99:fix(rating)__reverse_arrow_key_navigation_in_RTL_mode
Open

Gershon99 wants to merge 1 commit into
ng-bootstrap:masterfrom
Gershon99:fix(rating)__reverse_arrow_key_navigation_in_RTL_mode

Conversation

@Gershon99

Copy link
Copy Markdown

No description provided.

@quentinderoubaix quentinderoubaix left a comment

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.

PR is fine for me once SSR is handled

Comment thread src/rating/rating.ts
onTouched = () => {};
ngAfterViewInit() {
const nativeElement = this._elRef.nativeElement as HTMLElement;
this.direction = getComputedStyle(nativeElement).direction === 'ltr' ? 'ltr' : 'rtl';

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.

please wrap this in a call to isPlatformBrowser to make sure the rating is not broken in SSR

@codecov-commenter

codecov-commenter commented Jun 15, 2025 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.50%. Comparing base (b5d5feb) to head (a0ded96).
⚠️ Report is 171 commits behind head on master.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4837      +/-   ##
==========================================
+ Coverage   88.65%   89.50%   +0.85%     
==========================================
  Files         120      121       +1     
  Lines        3817     4803     +986     
  Branches      747      983     +236     
==========================================
+ Hits         3384     4299     +915     
- Misses        396      504     +108     
+ Partials       37        0      -37     
Flag Coverage Δ
e2e 89.50% <100.00%> (∅)
unit 89.50% <100.00%> (+0.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ngb-rating does not reverse arrow key navigation in RTL mode

3 participants