adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.12k stars 1.06k forks source link

Code mismatch in published packages & github repo #6580

Closed NarendraKuruva closed 1 week ago

NarendraKuruva commented 1 week ago

Provide a general summary of the issue here

I've cloned the repo and trying to copy the Combobox & ListBox related components as there are major UI changes in my app's combobox & ListBox

When I'm copying ListBoxBase, in useListBoxLayout hook while initialising ListLayout, in published package code, there is forceSectionHeaders key being passed.

But when I'm doing the same in my repo (copying the hook), I'm not able to pass forceSectionHeaders to ListLayout.

Attached the error screenshot image

This is the type we have in ListLayoutOptions image

This is the type we are getting in your repo(react-spectrum) image

We are using below react-spectrum packages "@react-spectrum/button": "3.16.4", "@react-spectrum/dialog": "3.8.11", "@react-spectrum/label": "3.16.6", "@react-spectrum/provider": "3.9.7", "@react-stately/collections": "3.10.7", "@react-stately/layout": "3.13.9", "@react-stately/list": "3.10.5", "@react-stately/overlays": "3.6.7", "react-stately": "3.31.1", "@react-aria/datepicker": "3.10.1", "@react-aria/listbox": "3.12.1", "@react-aria/overlays": "3.22.1", "@react-aria/separator": "3.3.13", "@react-aria/tabs": "3.9.1", "@react-aria/textfield": "3.14.5", "@react-aria/utils": "3.24.1", "@react-aria/virtualizer": "3.10.1", "react-aria": "3.33.1",

🤔 Expected Behavior?

Components should work fine without any typescript errors

😯 Current Behavior

Getting typescript errors

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

  1. Clone your repo
  2. In a new react app, install latest combobox dependency packages
  3. Copy your combobox and Listbox code

Version

Not using react spectrum. Using components by directly copying

What browsers are you seeing the problem on?

Chrome

If other, please specify.

We are using above mentioned packages

What operating system are you using?

Ubuntu 22.04.4 LTS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

snowystinger commented 1 week ago

This is not a bug, main was last published May 21st. The code you're looking at was added two days ago in https://github.com/adobe/react-spectrum/pull/6535. When we publish next, it'll include the change.

NarendraKuruva commented 1 week ago

@snowystinger

Then how can I check the code that was published on May 21st?

snowystinger commented 1 week ago

You can use the github tag feature Screenshot 2024-06-20 at 3 00 14 PM or through here: https://github.com/adobe/react-spectrum/tags

or you can consult releases https://react-spectrum.adobe.com/releases/index.html

or if you know the githash, by looking at commits or git blame or something, you can browse the repo as it was in that state Screenshot 2024-06-20 at 2 58 47 PM

NarendraKuruva commented 1 week ago

You can use the github tag feature Screenshot 2024-06-20 at 3 00 14 PM or through here: https://github.com/adobe/react-spectrum/tags

or you can consult releases https://react-spectrum.adobe.com/releases/index.html

or if you know the githash, by looking at commits or git blame or something, you can browse the repo as it was in that state Screenshot 2024-06-20 at 2 58 47 PM

Got It :+1: :heavy_check_mark: Thank you