wakelock_plus icon indicating copy to clipboard operation
wakelock_plus copied to clipboard

fix: add support for non-root base-href

Open holzgeist opened this issue 1 year ago • 12 comments

Description

if a web-app is deployed using --base-href=/path/to/deployed/flutter/app during build, the URLs starting with ./assets won't work anymore. Using assetManager will properly resolve them. It uses assetBase from the loader config specified here

NB :warning:

I only tested the url.startsWith('assets/') code path as it's the only one used in the library. It should work the same for ./ though

holzgeist avatar Sep 18 '24 10:09 holzgeist

@holzgeist Please let me know if you're still gonna work on this change. Otherwise, I can commandeer it for you and take it to the finish line. Thanks.

diegotori avatar Sep 30 '24 23:09 diegotori

Hi @diegotori ,

thanks for the feedback. I'm going to work on it, probably today, maybe tomorrow

holzgeist avatar Oct 01 '24 07:10 holzgeist

@diegotori actually I need to solve some other issues before I have a working web-build to test this one. If you could commandeer this, it would be great, thanks :pray:

holzgeist avatar Oct 01 '24 11:10 holzgeist

@holzgeist please verify the fixes made to this PR. I was able to do a bit of cleanup and/or fixes. Thanks.

diegotori avatar Dec 03 '24 15:12 diegotori

@holzgeist If you have an angle on the latest no_sleep.js changes that I made, which now awaits for the web layer to enable the wakelock before considering it enabled, please feel free to review.

@ditman the above also applies to you as well, if you're able to review the JS changes that I made. Thanks.

diegotori avatar Dec 03 '24 17:12 diegotori

@diegotori thanks for working on this. But unfortunately this grew way outside of my comfort zone wrt flutter/web so I have to pass on reviewing this :see_no_evil:

holzgeist avatar Jan 08 '25 07:01 holzgeist

I left some comments, but I'm not an actual owner of the plugin, so please, take/ignore as you please from my comments.

Thanks for getting this fix over the finish line, and apologies for the delay in the review, it took me a long while to see this notification!

Thanks for reviewing this. Since you have a better handle on the JS side of things, I'll let you take point on what I should modify. Feel free to call out more things as you see them.

diegotori avatar Jan 08 '25 17:01 diegotori

Hi there! I'm back to actively working on a flutter/web port of our app. Is there anything I can help with on this PR?

holzgeist avatar Feb 20 '25 13:02 holzgeist

ok, thanks to @ditman 's super detailed review and suggestions I actually was able to understand everything that's going on and apply the suggestions (apart from testing). They definitely all look and feel like improvements, thanks again for the through review :pray:

@diegotori @ditman any thoughts?

holzgeist avatar Feb 20 '25 15:02 holzgeist

@holzgeist I'll definitely take a look hopefully this week.

Thanks for your contributions thus far.

diegotori avatar Mar 24 '25 14:03 diegotori

@holzgeist so far, it LGTM. @ditman, any thoughts on his changes?

diegotori avatar Mar 26 '25 20:03 diegotori

I added a commit to prevent _nativeEnabledCompleter from being null in the catch branch. Since then I realized that I had two requests running in parallel which interfered with each other. I'll still leave the commit there because it doesn't hurt :)

holzgeist avatar Apr 17 '25 09:04 holzgeist