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

Refactor request item javascript #4105

Merged

Conversation

elasticspoon
Copy link
Collaborator

This refactors the Javascript for request buttons out of ERB templates and into a stimulus controller. Changes the button helper to pass the template block as an HTML template instead of a data attribute.

Type of change

  • Refactor

How Has This Been Tested?

No new tests. Pass all old tests.

feat: replaces dataset with template
@elasticspoon elasticspoon marked this pull request as ready for review February 12, 2024 21:39
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

I like this! A question and suggestion.

app/javascript/controllers/request_item_controller.js Outdated Show resolved Hide resolved
app/javascript/controllers/request_item_controller.js Outdated Show resolved Hide resolved
@elasticspoon elasticspoon force-pushed the refactor-request-item-javascript branch from cd3aabe to 67e85db Compare February 13, 2024 21:49
@elasticspoon elasticspoon requested a review from dorner February 13, 2024 21:55
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Nice - this is a great little refactor!

@dorner dorner merged commit 8bca5b3 into rubyforgood:main Feb 14, 2024
19 checks passed
@elasticspoon elasticspoon deleted the refactor-request-item-javascript branch February 14, 2024 20:24
Copy link
Contributor

@elasticspoon: Your PR Refactor request item javascript is part of today's Human Essentials production release: 2024.02.18.
Thank you very much for your contribution!

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.

2 participants