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

Add lazy loader to action_controller_base #1595

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Conversation

soberstadt
Copy link
Contributor

Description

Instances of ActionController::API subclasses are currently incompatible with the primer engine.

image

Integration

No breaking changes.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@soberstadt soberstadt requested review from a team and camertron November 10, 2022 16:11
@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2022

🦋 Changeset detected

Latest commit: d94c517

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@camertron
Copy link
Contributor

Hey @soberstadt, can you provide a bit more info around why this change is necessary? Things seem to be working for us as-is.

@soberstadt
Copy link
Contributor Author

Do you have an controllers that directly extend ActionController::API? For example in my application we're using doorkeeper which exposes an API who's controller extends ActionController::API. I'll try to put together a demo app to reproduce my error.

@soberstadt
Copy link
Contributor Author

Demo app: https://github.com/soberstadt/view_components1595
I wasn't able to get it working as a single page app.

image

@soberstadt
Copy link
Contributor Author

To further clarify, this issue was found while using Doorkeeper's token info api (which by default inherits from ActionController::API)

@camertron
Copy link
Contributor

Hey @soberstadt, apologies for the delay here. I'm still not sure I understand the change, but if it works for you and doesn't adversely affect github.com, I'm ok merging it.

Could you add a changeset when you get a chance? Run npx changeset and follow the prompts (we always bump the patch version btw).

Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

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

Thank you!

@camertron camertron merged commit f31bf3f into primer:main Feb 13, 2023
@primer-css primer-css mentioned this pull request Feb 13, 2023
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