Skip to content
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

TS Strict update react-aria 'b' and 'L' #3930

Merged
merged 14 commits into from
Mar 20, 2023

Conversation

snowystinger
Copy link
Member

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

# Conflicts:
#	packages/@react-aria/landmark/src/useLandmark.ts
#	packages/@react-aria/landmark/stories/Landmark.stories.tsx
#	packages/@react-aria/landmark/test/useLandmark.test.tsx
@rspbot
Copy link

rspbot commented Jan 24, 2023

# Conflicts:
#	packages/@react-aria/landmark/src/useLandmark.ts
@rspbot
Copy link

rspbot commented Jan 30, 2023

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

Just one nit, but otherwise looks fine to me

}, 100);
});
}) as EventListener);
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Member Author

Choose a reason for hiding this comment

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

@rspbot
Copy link

rspbot commented Feb 2, 2023

@rspbot
Copy link

rspbot commented Feb 2, 2023

@rspbot
Copy link

rspbot commented Feb 2, 2023

@rspbot
Copy link

rspbot commented Feb 2, 2023

@rspbot
Copy link

rspbot commented Feb 9, 2023

@rspbot
Copy link

rspbot commented Mar 2, 2023

ktabors
ktabors previously approved these changes Mar 17, 2023
LFDanLu
LFDanLu previously approved these changes Mar 17, 2023
Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

LGTM

devongovett
devongovett previously approved these changes Mar 17, 2023
@@ -244,10 +244,10 @@ class LandmarkManager implements LandmarkManagerApi {
private closestLandmark(element: Element) {
let landmarkMap = new Map(this.landmarks.map(l => [l.ref.current, l]));
let currentElement = element;
while (currentElement && !landmarkMap.has(currentElement) && currentElement !== document.body) {
while (currentElement && !landmarkMap.has(currentElement as FocusableElement) && currentElement !== document.body && currentElement.parentElement) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: make the type of the argument FocusableElement so it is only needed in one place?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure will make a followup

Copy link
Member Author

Choose a reason for hiding this comment

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

urgh, merge conflicts, I'll take care of it here since I'll have to get a new review anyways

@rspbot
Copy link

rspbot commented Mar 18, 2023

# Conflicts:
#	packages/@react-aria/listbox/src/useOption.ts
@snowystinger snowystinger dismissed stale reviews from devongovett, LFDanLu, and ktabors via 46a0046 March 20, 2023 18:53
@rspbot
Copy link

rspbot commented Mar 20, 2023

@rspbot
Copy link

rspbot commented Mar 20, 2023

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

LGTM

@rspbot
Copy link

rspbot commented Mar 20, 2023

@rspbot
Copy link

rspbot commented Mar 20, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

@react-aria/landmark

useLandmark

 useLandmark {
   props: AriaLandmarkProps
-  ref: MutableRefObject<FocusableElement>
+  ref: RefObject<FocusableElement>
   returnVal: undefined
 }

@snowystinger snowystinger merged commit bd5adc8 into main Mar 20, 2023
@snowystinger snowystinger deleted the ts-strict-update-react-aria-b branch March 20, 2023 22:15
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.

5 participants