bolt icon indicating copy to clipboard operation
bolt copied to clipboard

DS-661: Replace Preact with React

Open danielamorse opened this issue 2 years ago • 0 comments

Jira

  • https://pegadigitalit.atlassian.net/browse/DS-661

Summary

Replace Preact renderer with React so that Bolt can include React/JSX files in the build.

Details

  • Remove Preact-related dependencies and babel/webpack configurations and replace with latest versions of React equivalent.
  • Upgrade react-autosuggest (used by Typeahead) for compatibility with latest React.
  • Remove unused accessibility features (a11yStatusResults, a11ySelectedOption, etc.). These features are not actuall in use.
  • Remove TypeaheadStatus component, which adds unnecessary accessibility customizations that I'm not sure even work as expected. The react-autosuggest library we are using is already WAI-ARIA compliant, with support for ARIA attributes and keyboard interactions.
  • I tested this in real Drupal and it works as expected 🎉

How to test

  • Test Typeahead demos and compare to current version.
  • Use with VoiceOver (command + F5) and verify it announces the same/similar prompts as the demos on https://react-autosuggest.js.org/.

Release notes

  • Preact dependency is replaced with React v18. Typeahead is now rendered with React.

danielamorse avatar Sep 20 '22 23:09 danielamorse