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

[Bug] Auto Inject Assets: Only if component rendered #1683

Closed
wants to merge 1 commit into from

Conversation

yparitcher
Copy link

Regression from 65ce494 #1371

Fixes: #1587

Check if component is instanceof DataTableComponent so as not to inject on every livewire page, only ones with a datatable component

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests and did you add any new tests needed for your feature?
  2. Did you update all templates (if applicable)?
  3. Did you add the relevant documentation (if applicable)?
  4. Did you test locally to make sure your feature works as intended?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Regression from 65ce494 rappasoft#1371

Fixes: rappasoft#1587

Check if component is instanceof DataTableComponent so as not to inject on every livewire page, only ones with a datatable component
@yparitcher
Copy link
Author

@lrljoe

@lrljoe
Copy link
Collaborator

lrljoe commented Mar 5, 2024

Thanks for the tag!

I'll do my absolute best to give it a look tomorrow, as then I'm not about for a week or two.

The injection code needs another update in general as well, as there's some more core stuff that I've not gotten around to merging in from Livewire core just yet, which albeit were minor tweaks.

Also intending to wrap up the code for "public" usage properly in case people do want to publish it and use it that way, but that's probably a month away.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.14%. Comparing base (6c759e0) to head (44bb82a).
Report is 145 commits behind head on v3-development.

Files with missing lines Patch % Lines
src/Features/AutoInjectRappasoftAssets.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             v3-development    #1683      +/-   ##
====================================================
- Coverage             88.16%   88.14%   -0.03%     
- Complexity             1314     1316       +2     
====================================================
  Files                   123      123              
  Lines                  3110     3113       +3     
====================================================
+ Hits                   2742     2744       +2     
- Misses                  368      369       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

stale bot commented Apr 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Apr 11, 2024
@yparitcher
Copy link
Author

@lrljoe ?

@stale stale bot closed this Apr 26, 2024
@lrljoe lrljoe reopened this Apr 29, 2024
@stale stale bot removed the wontfix This will not be worked on label Apr 29, 2024
@lrljoe
Copy link
Collaborator

lrljoe commented Apr 29, 2024

Apologies, been a bit busy of late! Will look to get this reviewed and merged in this week.

@lrljoe
Copy link
Collaborator

lrljoe commented May 30, 2024

Not forgotten! Just need to spin up a fresh test environment to validate this, as I don't use the injection approach!

Copy link

stale bot commented Jun 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jun 29, 2024
@stale stale bot closed this Jul 8, 2024
@yparitcher
Copy link
Author

@lrljoe
bump

@lrljoe lrljoe reopened this Jul 10, 2024
@stale stale bot removed the wontfix This will not be worked on label Jul 10, 2024
@lrljoe
Copy link
Collaborator

lrljoe commented Jul 10, 2024

Re-Opening as this is just something I've overlooked and not had time to review properly.

@lrljoe lrljoe self-assigned this Jul 10, 2024
@lrljoe lrljoe changed the base branch from develop to development July 11, 2024 00:00
@lrljoe
Copy link
Collaborator

lrljoe commented Jul 11, 2024

Changed base branch to "development" (where I'm currently working)

Note that I definitely need to bring the auto-injection back up to the current approach with Livewire core approach, as it's been a while since I worked on that.

@lrljoe
Copy link
Collaborator

lrljoe commented Jul 11, 2024

Definitely keen to implement this, however - I've run a couple of tests on this, as it doesn't seem to be producing consistent behaviour.

For example:

  1. Open a new browser/tab to a page that does not contain a table
  2. Navigate to a page that does contain a table using wire:navigate

What I'm seeing when this happens is - the JS which populates/presents various options (e.g. the Filter dropdown) isn't firing until an additional action is fired. (e.g. column sorting).

If you navigate directly to a page with a table (or don't use wire:navigate), then it works as you'd expect.

So I'll need to pop some bits open to see what's actually happening under the hood!

@yparitcher
Copy link
Author

I don't use wire:navigate much, so did not test that interaction.

@lrljoe
Copy link
Collaborator

lrljoe commented Jul 12, 2024

Yeah, I think it's an issue with wire:navigate and loading components in, need to pop open the livewire core code and verify tho

Copy link

stale bot commented Sep 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 15, 2024
@stale stale bot closed this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants