-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(aria/multi): Add accessors for pattern properties #32220
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
base: main
Are you sure you want to change the base?
Conversation
0e85248 to
61d7ae0
Compare
181fcb8 to
fd799bd
Compare
1591234 to
450a94d
Compare
src/aria/grid/grid.ts
Outdated
| readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop'); | ||
|
|
||
| /** The currently active cell. */ | ||
| readonly activeCell = computed(() => this._pattern.activeCell()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
activeCell is the ui pattern type, so we might want to hide it.
src/aria/grid/grid.ts
Outdated
| readonly isFocused = computed(() => this._pattern.isFocused()); | ||
|
|
||
| /** Whether to pause grid navigation. */ | ||
| readonly pauseNavigation = computed(() => this._pattern.pauseNavigation()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implementation detail so let's not expose this.
src/aria/toolbar/toolbar.ts
Outdated
| /** Whether the widget is currently active (focused). */ | ||
| readonly active = computed(() => this._pattern.active()); | ||
| /** Whether the widget is currently the active one (focused). */ | ||
| readonly active = computed(() => this._pattern.active); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to return a signal function which I am not sure if it's intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! That got messed up in the merge. Thanks for the catch.
src/aria/menu/menu.ts
Outdated
| readonly isFocused = computed(() => this._pattern.isFocused()); | ||
|
|
||
| /** Whether the menu has received focus. */ | ||
| readonly hasBeenFocused = computed(() => this._pattern.hasBeenFocused()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is implementation detail for setting default state that I don't think developers should rely on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that too. Should we also then remove hasBeenFocused pre-existing that from before? I added them mostly because that was there to see if we wanted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually those are referenced at this level so can't be private or removed. I'll add a note to fix or add to the spreadsheet to track clean-up.
1a4dca7 to
f407f57
Compare
96a0c8f to
a9384a6
Compare
a9384a6 to
1c43757
Compare
No description provided.