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 Long Quote Block in LiveResource #659

Merged
merged 22 commits into from
Nov 14, 2024

Conversation

pehbehbeh
Copy link
Member

@pehbehbeh pehbehbeh commented Nov 8, 2024

see https://hexdocs.pm/credo/Credo.Check.Refactor.LongQuoteBlocks.html

  • move everything from quote block to top level module in Backpex.LiveResource
  • change some internal function to private; see f7f124b
  • remove Backpex.LiveResource.schema/0 function; see 709bff8
  • fix live updates for non-id primary keys; see dc051d2
  • remove obsolete Backpex.LiveResource.can?/4 helper; see 9bdd735 and a474210
  • simplify active filters function; see 2aad9ba
  • simplify get_filter_options function; see 2a43e79

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@pehbehbeh pehbehbeh added the enhancement Changes that are not breaking label Nov 8, 2024
@pehbehbeh pehbehbeh self-assigned this Nov 8, 2024
@pehbehbeh pehbehbeh requested a review from Flo0807 November 8, 2024 13:35
@pehbehbeh
Copy link
Member Author

@Flo0807 I changed a few internal function with theoretically could be used from the outside. The chance is relatively small... should we add it to the upgrade guide?

@pehbehbeh pehbehbeh marked this pull request as ready for review November 8, 2024 13:37
@Flo0807
Copy link
Collaborator

Flo0807 commented Nov 8, 2024

@Flo0807 I changed a few internal function with theoretically could be used from the outside. The chance is relatively small... should we add it to the upgrade guide?

I'd say yes, but we don't have to explain every change in detail. @pehbehbeh

@pehbehbeh pehbehbeh merged commit a14fd38 into develop Nov 14, 2024
6 checks passed
@pehbehbeh pehbehbeh deleted the feature/refactor-liveresource-using branch November 14, 2024 17:23

{:noreply, socket}
end
def handle_event(event, params, socket), do: LiveResource.handle_event(event, params, socket)
Copy link
Collaborator

@Flo0807 Flo0807 Nov 28, 2024

Choose a reason for hiding this comment

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

@pehbehbeh this will catch all events, and users are no longer able to define own handle_event functions in their LiveResources because all events are delegated toBackpex.LiveResource. Same with handle_info etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that are not breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants