angular / angular/components

bug(MatList): Icons do not respect RTL direction

オープン
#30,537 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/list i18n P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When using MatList in an RTL project, the icons do not adjust their margins correctly based on the text direction (dir="rtl"). The left and right margins remain the same as in LTR mode, causing misalignment in RTL layouts.

I was able to fix this issue easily with custom CSS, but I wanted to report it as a bug in case it needs to be addressed in the library.

### Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

### Expected Behavior

Icons should switch their margins correctly when dir="rtl" is set.

### Actual Behavior

Icons remain aligned as if the project is LTR, leading to incorrect spacing.

### Environment

Angular: 18
Angular Material: 19.1.5
Browser: Latest version of Chrome
Operating System: Windows (running a Linux dev container on WSL)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、dir="rtl" と最新の Chrome を使用し、Angular Material 19.1.5 を使った Angular 18 プロジェクトで MatList のアイコン間隔の問題を再現します。RTL と LTR におけるアイコンのマージンと配置を比較します。アイコンの間隔がテキストの方向に正しく従えば、issue は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend, internationalization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。