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

React component conversion(class to functional) - 2 #3209

Merged
merged 2 commits into from
Aug 11, 2024

Conversation

nahbee10
Copy link
Collaborator

@nahbee10 nahbee10 commented Aug 5, 2024

Fixes #2709

Changes:

  • applied react functional component conversion to searchBar and quickAddList
    I have verified that this pull request:
  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@nahbee10 nahbee10 marked this pull request as draft August 5, 2024 22:59
Copy link

release-com bot commented Aug 5, 2024

Release Environments

This Environment is provided by Release, learn more!
To see the status of the Environment click on Environment Status below.

🔧Environment Status : https://app.release.com/public/Processing%20Foundation/env-73ab94923a

@nahbee10 nahbee10 marked this pull request as ready for review August 6, 2024 02:48
@nahbee10 nahbee10 changed the title [WIP] React component conversion(class to functional) - 2 React component conversion(class to functional) - 2 Aug 6, 2024
khanniie referenced this pull request in nahbee10/p5.js-web-editor Aug 7, 2024
Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this!

I loaded this PR locally, and everything seems to generally work well for me. The overall code changes look okay to me as well, but will defer to @khanniie's review!

One other thing to note (more so in upcoming PRs)—it would be great to add more specific details or context surrounding the changes for each file in the PR description. This would be helpful to get a better understanding of these changes and for documentation purposes!

@@ -10,8 +10,21 @@ const Item = ({ isAdded, onSelect, name, url }) => {
const buttonLabel = isAdded
? t('QuickAddList.ButtonRemoveARIA')
: t('QuickAddList.ButtonAddToCollectionARIA');

const handleKeyDown = (event) => {
Copy link
Collaborator

@khanniie khanniie Aug 8, 2024

Choose a reason for hiding this comment

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

i think buttons should do this natively? might not be necessary~

Copy link
Collaborator

@khanniie khanniie Aug 8, 2024

Choose a reason for hiding this comment

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

oh nvm i see it's a div not a button -- i think in that case then we should just let the button within it be focusable / interactive and let the div be a container? meaning we remove the role & onClick/onKeydown handlers and tabindex. let me know if there's something im missing though!

@khanniie
Copy link
Collaborator

khanniie commented Aug 8, 2024

LGTM overall! : )

@nahbee10
Copy link
Collaborator Author

One other thing to note (more so in upcoming PRs)—it would be great to add more specific details or context surrounding the changes for each file in the PR description. This would be helpful to get a better understanding of these changes and for documentation purposes!

@raclim I'll keep this in mind for the next PRs!!

@nahbee10 nahbee10 merged commit 2b9cb0a into develop Aug 11, 2024
4 checks passed
@raclim raclim deleted the react-fc-conversion-2 branch August 12, 2024 21:08
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.

Changing class component to Functional Component.
3 participants