Migrate bookkeeping lookup mount to React on Rails#13489
Open
justin808 wants to merge 1 commit intohackclub:mainfrom
Open
Migrate bookkeeping lookup mount to React on Rails#13489justin808 wants to merge 1 commit intohackclub:mainfrom
justin808 wants to merge 1 commit intohackclub:mainfrom
Conversation
Member
|
Hey Justin! Great to hear from you 😊! I'll give this a read next week—let me know once this is ready for review. |
Author
|
Ready for review. I reran the slice in the repo documented Docker Compose path: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the problem
hcbalready usesreact-rails, but that leaves the app on an older Rails + React integration path while newer maintenance and documentation effort is concentrated around React on Rails and Shakapacker.I maintain both
react-railsandreact_on_rails, and for incremental Rails + React work I recommend moving toward React on Rails because it is the better-supported path going forward.This PR is intentionally small. It converts one admin mount (
bookkeeping/StripeChargeLookup) first so the app can prove a safe coexistence path before touching any broader frontend architecture.Background docs:
Describe your changes
This keeps the rest of the app untouched and only migrates the bookkeeping lookup mount.
Changes in this slice:
react_on_railsgem and JS packageBookkeepingStripeChargeLookupin the existing JS bundlereact-railsto an explicitreact_on_rails_componenthelperreact_component(...)behavior for the many remainingreact-railsmounts so both integrations can coexist safely during an incremental migrationWhy this is better:
react-railswithout forcing a full rewriteLocal validation:
Dockerfilebuild succeedsyarn buildyarn build:cssbundle exec rspec spec/controllers/admin_controller_bookkeeping_spec.rbbundle exec rubocop app/helpers/react_on_rails_migration_helper.rb config/initializers/react_on_rails.rb config/initializers/react_on_rails_helper_override.rb spec/controllers/admin_controller_bookkeeping_spec.rbAsset-level comparison in the same Docker image:
bundle.js:2,739,714->2,754,760bytes (+15,046)yarn build:10,035 ms->9,101 msSo this first slice adds a small amount of bootstrap code, but it does not introduce a build-time regression, and the primary win is maintainability plus a cleaner forward migration path.