WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Extract `getNodeText` and add Unit Tests #55495

Open jeryj opened 1 year ago

jeryj commented 1 year ago

We needed to get an accessibility fix in to resolve (https://github.com/WordPress/gutenberg/issues/47767) before the release. Given it was such a short timeline, having the fix be beta tested more was more important than this refactor. As a follow-up, there's some refactoring we could do to improve the getNodeText implementation from https://github.com/WordPress/gutenberg/pull/54902

  1. Extract it to its own file
  2. Add unit tests to verify the correct functionality
  3. Refactor it to remove code that won't be run.
alexstine commented 1 year ago

https://github.com/WordPress/gutenberg/pull/54902#discussion_r1366025992

sreeragdas commented 9 months ago

@alexstine , i am interested in working , can u pls share me the details

alexstine commented 9 months ago

@sreeragdas All details are in the description above. Essentially, we need to move that helper function to a new file and write unit tests around it to prevent regressions. Thanks.

oceantober commented 7 months ago

Hello! My team of 3 beginner students from Code Day would like to work on this issue!

alexstine commented 7 months ago

@oceantober Sure, have them open a PR. Happy to review their work. Thanks.